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:
Jeena 2026-01-04 19:55:27 +09:00
parent a32f79980e
commit a0f40a1327

View file

@ -2,6 +2,7 @@
Description=Email Forwarder
[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"'