14 lines
391 B
Text
14 lines
391 B
Text
|
#!/bin/sh
|
||
|
|
||
|
# Tailored to be called as a systemd error notification.
|
||
|
# Inspired by: https://wiki.archlinux.org/title/Systemd/Timers#As_a_cron_replacement
|
||
|
|
||
|
sendmail -t <<ERRMAIL
|
||
|
To: {{ machine_notifications_receiver }}
|
||
|
From: {{ machine_from_email }}
|
||
|
Subject: "$1.service" stumbled
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
||
|
$(systemctl status --full "$1")
|
||
|
ERRMAIL
|