Current File : //root/patch24102018.sh
filechk="/etc/sentora/panel/patch20072018.log_BK_24102018"
if [ -f "$filechk" ]
then
    echo "Patch 20072018 Already Updated" >> /etc/sentora/panel/patch20072018.log
    exit
fi
mv /etc/sentora/panel/patch20072018.log /etc/sentora/panel/patch20072018.log_BK_24102018
file="/etc/sentora/panel/patch20072018.log"
if [ -f "$file" ]
then
    echo "Patch 20072018 Already Updated" >> /etc/sentora/panel/patch20072018.log
    exit
fi
touch /etc/sentora/panel/patch20072018.log
echo "Patch 20072018 started here" >> /etc/sentora/panel/patch20072018.log
cd /etc/sentora/panel
wget -O 20072018report.zip http://hostingraja.info/20072018report.zip   
unzip -o 20072018report.zip
PHP_PATH=`whereis php | awk '{print $2}'`
`$PHP_PATH /etc/sentora/panel/20072018report.php >> /etc/sentora/panel/patch20072018.log`
rm -f /etc/sentora/panel/20072018report.php
rm -f /etc/sentora/panel/20072018report.zip
echo "Patch 20072018 updated successfully"  >> /etc/sentora/panel/patch20072018.log