CHips L MINI SHELL

CHips L pro

Current Path : /proc/3/task/3/cwd/proc/self/root/proc/3/root/opt/zabbix_scripts/
Upload File :
Current File : //proc/3/task/3/cwd/proc/self/root/proc/3/root/opt/zabbix_scripts/cpanel.whmcpanel_version.sh

#!/bin/bash
################################################################################################################
#                                                                                                              #
# !!!!!!!!!!! This file is managed by Puppet.  Do not edit directly.  Changes will be overwritten. !!!!!!!!!!! #
#                                                                                                              #
# Author:   William O.                                                                                         #
# Revision: 20191227.2100                                                                                      #
################################################################################################################


STATE_OK=0
STATE_WARNING=1

CUR_VERSION=$(cat /usr/local/cpanel/version)
TIERS=$(curl -s http://httpupdate.cpanel.net/cpanelsync/TIERS | grep -ve '^#' -e '^[0-9]' -e 'disabled' | awk -F: '{print $NF}' | sed -e 's/\.[0-9]*$//g' | sort | uniq)

#VALUE=$((echo "${CUR_VERSION}" | grep -q "${TIERS}") || echo "Outdated version of cPanel detected")

if [ -z "${VALUE}" ]
then
        RET=${STATE_OK}
        DATA="OK: ${CUR_VERSION}"
else
        RET=${STATE_CRITICAL}
        DATA="OUTDATED: ${CUR_VERSION}"
fi

echo "${DATA}"
exit ${RET}

Copyright 2K16 - 2K18 Indonesian Hacker Rulez