14 lines
No EOL
391 B
Django/Jinja
14 lines
No EOL
391 B
Django/Jinja
#!/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 |