unitstatus: unit status cmd is more robust
This commit is contained in:
parent
3237810611
commit
e9c8320f72
@ -25,7 +25,7 @@
|
|||||||
for e in "''${@:2}"; do
|
for e in "''${@:2}"; do
|
||||||
EXTRA+="$e"$'\n'
|
EXTRA+="$e"$'\n'
|
||||||
done
|
done
|
||||||
UNITSTATUS=$(${pkgs.systemd}/bin/systemctl status "$UNIT")
|
UNITSTATUS=$(${pkgs.systemd}/bin/systemctl status "$UNIT" || :)
|
||||||
${pkgs.postfix}/bin/sendmail $MAILTO <<EOF
|
${pkgs.postfix}/bin/sendmail $MAILTO <<EOF
|
||||||
Subject:Status mail for unit: $UNIT
|
Subject:Status mail for unit: $UNIT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user