403Webshell
Server IP : 172.67.157.124  /  Your IP : 216.73.216.213
Web Server : LiteSpeed
System : Linux s12482.usc1.stableserver.net 5.14.0-570.32.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 6 11:30:41 EDT 2025 x86_64
User : snownico ( 1231)
PHP Version : 8.2.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib64/nagios/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/nagios/plugins/vz7_check_a2_license.sh
#!/bin/bash
#
# Script to monitor vz7 license status
# Ref SYSENG-1618
#

vzlicinfo=$(vzlicview|grep -iE "expiration|status")
expire_time=$(date -d "$(echo "$vzlicinfo"|awk -F"=" '/expiration=/ {print $2}'|tr -d '\"')" +%s)
lic_status=$(echo "$vzlicinfo"|awk -F"=" '/status=/ {print $2}'|tr -d '\"')

if [ "${lic_status}" != "ACTIVE" ]; then
  printf "vz7lic_check - License is not active\n"
  exit 2
else
  seconds_to_expiry=$((${expire_time} - $(date +%s)))
  # 604800s = 7days
  if [ "${seconds_to_expiry}" -lt 604800 ]; then
    days_to_expiry=$((${seconds_to_expiry}/86400))
    printf "vz7lic_check - License is about to expire in ${days_to_expiry} days\n"
    exit 1
  else
    printf "vz7lic_check - License is active \n"
    exit 0
  fi
fi

Youez - 2016 - github.com/yon3zu
LinuXploit