Status e-mail: Use only main process exit code
Previously, the exit code of an ExitStartPre script might have wound up in the e-mail subject.
This commit is contained in:
parent
d0d2f1f64e
commit
801a472e99
|
@ -20,7 +20,7 @@ in
|
||||||
to="${toAddress}"
|
to="${toAddress}"
|
||||||
service="$1"
|
service="$1"
|
||||||
full_status="$(systemctl status --full --lines 200 "$service")"
|
full_status="$(systemctl status --full --lines 200 "$service")"
|
||||||
exit_code="$(echo "$full_status" | head -n5 | tail -1 | sed -e 's/.*status=\(.*\))$/\1/g')"
|
exit_code="$(echo "$full_status" | head -n5 | tail -1 | sed -e 's/.*ExecStart=.*status=\(.*\))$/\1/g')"
|
||||||
# state="$(systemctl is-failed "$service")"
|
# state="$(systemctl is-failed "$service")"
|
||||||
|
|
||||||
fail_priority=1
|
fail_priority=1
|
||||||
|
|
Loading…
Reference in a new issue