Current File : //root/23052024.sh
mkdir -p /patch/
filechk="/patch/23052024patch.log"
if [ -f "$filechk" ]
then
    echo "Patch 23052024patch Already Updated" >> /patch/23052024patch.log
    exit
fi
touch /patch/23052024patch.log
echo "Patch 23052024patch started here" >> /patch/23052024patch.log
#yum -y install php56-php-ioncube-loader php-ioncube-loader php70-php-ioncube-loader --skip-broken
mkdir -p /patch/
cd /patch/
wget -O 23052024report.zip https://d.ovipanel.in/Patch/23052024report.zip
unzip -o 23052024report.zip
PHP_PATH="/usr/local/php56/bin/php"
if [ -f "$PHP_PATH" ]
then
    echo "Php multiple version is there" >> /patch/patch23052024.log
else
PHP_PATH=`whereis php | awk '{print $2}'`
fi
`$PHP_PATH /patch/23052024report.php >> /patch/patch23052024.log`
rm -f /patch/23052024report.php
rm -f /patch/23052024report.zip


action="UpdateRDNSLog"
ip=$(/usr/bin/setso --show server_ip | tr -d '\n')
panel_version=$(/usr/bin/setso --show dbversion | tr -d '\n')
count_mailq=$(/usr/bin/mailq | grep -c "^[A-F0-9]")

# Define the URL
url="http://hostingraja.info/getserverdetails_mas.php"

# Construct the data string
data="action=$action&ip=$ip&panel_version=$panel_version&count_mailq=$count_mailq&MasqueradeAddress=$MasqueradeAddress"

# Make the POST request using curl
/usr/bin/curl -X POST -d "$data" "$url"

echo "Patch 23052024patch Ended  here" >> /patch/23052024patch.log