WorkingDirectory is required to set the cwd to the project dir for relative paths like ./state. It was accidentally removed in a previous edit. Changes: - Add WorkingDirectory= to [Service] section
12 lines
333 B
Desktop File
12 lines
333 B
Desktop File
[Unit]
|
|
Description=Email Forwarder
|
|
OnFailure=email_forwarder-fail-notify.service
|
|
|
|
[Service]
|
|
WorkingDirectory=${PROJECT_DIR}
|
|
ExecStart=${PROJECT_DIR}/venv/bin/python -m email_forwarder
|
|
EnvironmentFile=${PROJECT_DIR}/.env
|
|
ExecStartPost=/bin/sh -c '/usr/bin/curl -fsS --retry 3 "$UPTIME_SUCCESS_URL"'
|
|
|
|
[Install]
|
|
WantedBy=default.target
|