Blame view

check_systemd/check_systemd.sh 183 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

UNIT=$1

systemctl status $UNIT > /dev/null
RET=$?

if [[ $RET != 0 ]]; then
  echo "SERVICE $UNIT - CRITICAL: Not running"
  exit 2
fi

echo "SERVICE $UNIT - OK"
exit 0