HEX
Server: Apache
System: Linux cpanel.classit.ro 4.18.0-553.144.1.el8_10.x86_64 #1 SMP Tue Jul 14 09:26:58 EDT 2026 x86_64
User: contexpert (1050)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/test/check_cpanel_license.sh
#!/bin/bash
#
# DESCRIPTION:
# Simple (really simple :D) Nagios script to check cPanel license.
#
# SYNTAX:
# ./check_cpanel_license.sh -H SERVER_IP/HOSTNAME (or $HOSTADDRESS$ in Nagios/Opsview)
#
# BY:
# Ahmed M. AbouZaid
#

if [ "$1" = "-H" ]; then
  curl -s https://verify.cpanel.net/app/verify?ip=$2 | grep -q 'status="1"';
  if [ $? = 0 ]; then
    echo "OK - CPANEL license is active."
    exit 0
  else
    echo "CRITICAL - CPANEL license is inactive."
    exit 2
  fi
else
  echo "Usage: $0 [OPTION]"
  echo "-H IP/Hostname"
fi