CHips L MINI SHELL

CHips L pro

Current Path : /proc/3/task/3/cwd/opt/zabbix_scripts/oldscripts/
Upload File :
Current File : //proc/3/task/3/cwd/opt/zabbix_scripts/oldscripts/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