first commit

This commit is contained in:
Yavuz Aydın 2021-01-07 16:06:51 +01:00
parent 203f9d02db
commit 061aff6ee8
1 changed files with 15 additions and 10 deletions

View File

@ -33,6 +33,8 @@
# # # #
############################################################################################## ##############################################################################################
APPNAME=`basename $0`
OK=0 OK=0
WARNING=1 WARNING=1
CRITICAL=2 CRITICAL=2
@ -47,16 +49,19 @@ if [ $? -ne 0 ]; then
fi fi
function usage() { function usage() {
echo "check_reboot-required" cat - <<EOF
echo "" Usage: ${APPNAME} [--help]
echo "Usage: $0 [-w|--warn] [-h|--help]" Usage: ${APPNAME} [--warn]
echo ""
echo " -h This text" This check command checks if a reboot are required after an upgrade. It will
echo " --help" also list packages that requires a reboot to ease the decision for the
echo "" sysadmin if/when a reboot needs to be carried out.
echo " -w Report warning (instead of a critical) condition if reboot is required"
echo " --warn" -h, --help
echo "" Show this help
-w, --warn
Report warning (instead of a critical) condition if reboot is required
EOF
} }
case $1 in case $1 in