]> code.delx.au - systemd-monitor/blob - systemd-monitor
Initial commit
[systemd-monitor] / systemd-monitor
1 #!/bin/bash
2
3 function get_state {
4 systemctl show --property=SystemState
5 }
6
7 sleep 60
8
9 while [ "$(get_state)" = "SystemState=running" ]; do
10 sleep 60
11 done
12
13 systemctl --failed | mail -s "$(get_state) on $(hostname)" root
14
15 exit 1