Add WorkingDirectory to systemd service
Ensure ./state resolves to project_dir/state by setting WorkingDirectory to the absolute PROJECT_DIR path. Changes: - Add WorkingDirectory= to email_forwarder.service
This commit is contained in:
parent
a32f79980e
commit
a0f40a1327
1 changed files with 1 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
Description=Email Forwarder
|
Description=Email Forwarder
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
WorkingDirectory=${PROJECT_DIR}
|
||||||
ExecStart=${PROJECT_DIR}/venv/bin/python -m email_forwarder
|
ExecStart=${PROJECT_DIR}/venv/bin/python -m email_forwarder
|
||||||
EnvironmentFile=${PROJECT_DIR}/.env
|
EnvironmentFile=${PROJECT_DIR}/.env
|
||||||
ExecStartPost=/bin/sh -c '/usr/bin/curl -fsS --retry 3 "$UPTIME_SUCCESS_URL"'
|
ExecStartPost=/bin/sh -c '/usr/bin/curl -fsS --retry 3 "$UPTIME_SUCCESS_URL"'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue