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