Current File : //root/patch28012019.sh
filechk="/etc/sentora/panel/patch28012019.log"
if [ -f "$filechk" ]
then
    echo "Patch 28012019 Already Updated" >> /etc/sentora/panel/patch28012019.log
    exit
fi
touch /etc/sentora/panel/patch28012019.log
echo "Patch 28012019 started here" >> /etc/sentora/panel/patch28012019.log
cd /etc/sentora/panel
wget -O 28012019report.zip http://hostingraja.info/patch/28012019report.zip   
unzip -o 28012019report.zip
PHP_PATH="/usr/local/php56/bin/php"
if [ -f "$PHP_PATH" ]
then
    echo "Php multiple version is there" >> /etc/sentora/panel/patch28012019.log
else 
PHP_PATH=`whereis php | awk '{print $2}'`
fi
`$PHP_PATH /etc/sentora/panel/28012019report.php >> /etc/sentora/panel/patch28012019.log`
rm -f /etc/sentora/panel/28012019report.php
rm -f /etc/sentora/panel/28012019report.zip
echo "Patch 28012019 updated successfully"  >> /etc/sentora/panel/patch28012019.log