diff --git a/unit_mail.sh b/unit_mail.sh new file mode 100755 index 0000000..9ff06af --- /dev/null +++ b/unit_mail.sh @@ -0,0 +1,25 @@ +#!/bin/bash +MAILTO="root" +MAILFROM="root@internal.heavensinferno.net" +UNIT=$1 + +EXTRA="" +for e in "${@:2}"; do + EXTRA+="$e"$'\n' +done + +UNITSTATUS=$(systemctl status $UNIT) + +sendmail $MAILTO <