bundlewrap/bundles/sshmon/files/check_systemd_unit

11 lines
147 B
Text
Raw Normal View History

#!/bin/bash
if ! systemctl --quiet is-active "$1"
then
echo "CRITICAL - systemd unit $1 not active"
exit 2
else
echo OK
exit 0
fi