Convert email_forwarder.py to a package with __main__.py for module execution. Update systemd service to use -m email_forwarder. Configure pyproject.toml to exclude state/ from packaging. Changes: - Create email_forwarder/ package with __init__.py and __main__.py - Move main script to email_forwarder/email_forwarder.py - Update ExecStart to python -m email_forwarder - Add setuptools config to exclude state/ directory
10 lines
No EOL
251 B
Desktop File
10 lines
No EOL
251 B
Desktop File
[Unit]
|
|
Description=Email Forwarder
|
|
|
|
[Service]
|
|
ExecStart=${PROJECT_DIR}/venv/bin/python -m email_forwarder
|
|
ExecStartPost=/usr/bin/curl -fsS --retry 3 ${UPTIME_SUCCESS_URL}
|
|
OnFailure=email_forwarder-fail-notify.service
|
|
|
|
[Install]
|
|
WantedBy=default.target |