email-forwarder/email_forwarder.service
Jeena a1e6d84733 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
2026-01-04 20:15:22 +09:00

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