Re-add WorkingDirectory to systemd service

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
This commit is contained in:
Jeena 2026-01-04 20:15:22 +09:00
parent 6d8a5002e7
commit a1e6d84733

View file

@ -3,6 +3,7 @@ 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"'