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