Rename main.py to email_forwarder.py and fix systemd variable expansion
- Rename main.py to email_forwarder.py for better readability - Update systemd service to use in ExecStart and EnvironmentFile, remove WorkingDirectory to fix expansion issues - Update install.sh and README references - Drop-in sets PROJECT_DIR for runtime expansion Changes: - File rename: main.py -> email_forwarder.py - Service: ExecStart and EnvironmentFile now use - Docs: Updated to reflect new script name
This commit is contained in:
parent
fad2727ae8
commit
02f6461cbc
3 changed files with 2 additions and 4 deletions
|
|
@ -38,5 +38,5 @@ This will set up the virtual environment, systemd services, and provide post-ins
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
- Logs: `journalctl --user -u email_forwarder.service`
|
- Logs: `journalctl --user -u email_forwarder.service`
|
||||||
- Test: `source venv/bin/activate && python main.py`
|
- Test: `source venv/bin/activate && python email_forwarder.py`
|
||||||
- Timezone issues: Adjust UTC offset in script if needed.
|
- Timezone issues: Adjust UTC offset in script if needed.
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
Description=Email Forwarder
|
Description=Email Forwarder
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
ExecStart=${PROJECT_DIR}/venv/bin/python ${PROJECT_DIR}/email_forwarder.py
|
||||||
WorkingDirectory=${PROJECT_DIR}
|
|
||||||
ExecStart=${PROJECT_DIR}/venv/bin/python main.py
|
|
||||||
ExecStartPost=/usr/bin/curl -fsS --retry 3 ${UPTIME_SUCCESS_URL}
|
ExecStartPost=/usr/bin/curl -fsS --retry 3 ${UPTIME_SUCCESS_URL}
|
||||||
OnFailure=email_forwarder-fail-notify.service
|
OnFailure=email_forwarder-fail-notify.service
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue