# BSD 3-Clause License # # Copyright (c) 2019, Alban Vidal # All rights reserved. # # Please see license file on root of this directory ################################################################################ # !! GIT FILE !! # https://framagit.org/zorval/scripts/check-nrpe ################################################################################ # Little script which check systemd status RETURN_CODE=0 # Check systemd status STATUS=$(systemctl --failed --no-pager --no-legend) # Test if return is OK if [ -z "$STATUS" ]; then echo "OK" else echo "Systemd error" echo "$STATUS" RETURN_CODE=2 fi exit "$RETURN_CODE"