From 88c2ccbb2f22ebdd212ddb73766f2b3fbca1ad59 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Fri, 26 Apr 2024 12:42:54 +0200 Subject: [PATCH] Update import-email-to-piler.service to include environment file and set working directory --- imageroot/systemd/user/import-email-to-piler.service | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/imageroot/systemd/user/import-email-to-piler.service b/imageroot/systemd/user/import-email-to-piler.service index cd008b0..7ddc4a8 100644 --- a/imageroot/systemd/user/import-email-to-piler.service +++ b/imageroot/systemd/user/import-email-to-piler.service @@ -9,10 +9,13 @@ After=piler-app.service ConditionPathExists=!%S/state/sync2pilerdone [Service] -Type=forking - +EnvironmentFile=%S/state/environment +WorkingDirectory=%S/state +Restart=always +TimeoutStopSec=70 ExecStartPre=/usr/bin/bash -c "while [ -z "$MAIL_SERVER" ]; do echo '## Waiting the MAIL_SERVER is set' && sleep 5 ; done" ExecStart=/usr/local/bin/runagent import-emails +Type=forking [Install] WantedBy=default.target