Move OnFailure to [Unit] section
OnFailure directive must be in [Unit], not [Service], for systemd user services to recognize it. Changes: - Move OnFailure from [Service] to [Unit] in email_forwarder.service
This commit is contained in:
parent
05f2e6c870
commit
6d8a5002e7
1 changed files with 1 additions and 2 deletions
|
|
@ -1,12 +1,11 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Email Forwarder
|
Description=Email Forwarder
|
||||||
|
OnFailure=email_forwarder-fail-notify.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=${PROJECT_DIR}
|
|
||||||
ExecStart=${PROJECT_DIR}/venv/bin/python -m email_forwarder
|
ExecStart=${PROJECT_DIR}/venv/bin/python -m email_forwarder
|
||||||
EnvironmentFile=${PROJECT_DIR}/.env
|
EnvironmentFile=${PROJECT_DIR}/.env
|
||||||
ExecStartPost=/bin/sh -c '/usr/bin/curl -fsS --retry 3 "$UPTIME_SUCCESS_URL"'
|
ExecStartPost=/bin/sh -c '/usr/bin/curl -fsS --retry 3 "$UPTIME_SUCCESS_URL"'
|
||||||
OnFailure=email_forwarder-fail-notify.service
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue