CHips L MINI SHELL

CHips L pro

Current Path : /proc/self/root/proc/2/cwd/proc/2/cwd/usr/lib64/nagios/plugins/
Upload File :
Current File : //proc/self/root/proc/2/cwd/proc/2/cwd/usr/lib64/nagios/plugins/check_patchman_status

#!/bin/bash
#########################################################################
#                                                                       #
# Plugin name:  check_patchman_status                                   #
# Description:  Plugin to check if the patchman service is running.     #
# Author:       William Overko                                          #
# Version:      20171218                                                #
#                                                                       #
#########################################################################


declare patchmanStatusOutput=`/etc/init.d/patchman status`

if [[ "$patchmanStatusOutput" == "patchmand"*"is running..." ]]
then
    echo -e "OK: Patchman Is Up."
    exit 0
elif [ "$patchmanStatusOutput" == "patchmand dead but pid file exists" ] || [ "$patchmanStatusOutput" == "patchmand is stopped" ]
then
    echo -e "CRITICAL: Patchman Is Down."
    exit 2
fi

Copyright 2K16 - 2K18 Indonesian Hacker Rulez