# A forge that crashes is news. quarry.service has Restart=on-failure
# and the default RestartMode=normal, and under normal a restarting
# service passes through the "failed" state on EVERY crash (systemd.service
# on the host, systemd 259: only RestartMode=direct skips failed and with
# it OnFailure=). So this fires on each crash that systemd restarts, and
# again if the start limit (5 in 10s) gives up — not only at the limit.
# quarry-alert.sh sends at most one per ten minutes per unit, so a crash
# loop is one alert. A clean exit (status 0) and `systemctl restart` by a
# deploy are not failures and alert nothing.
[Unit]
OnFailure=quarry-alert@%N.service