Current File : //root/22082023.sh |
mkdir -p /patch/
filechk="/patch/patch22082023.log"
if [ -f "$filechk" ]
then
echo "Patch 22082023 Already Updated" >> /patch/patch04082023.log
exit
fi
touch /patch/patch22082023.log
cd /scripts
wget -O check_domains_log.sh https://d.ovipanel.in/Patch/check_domains_log.sh
dos2unix check_domains_log.sh
#/usr/bin/chmod 644 /etc/sentora/panel/manage.php
#/usr/bin/chown ovipanel. /etc/sentora/panel/manage.php
sleep 60
chmod_output=$(/bin/chmod 644 /scripts/check_domains_log.sh 2>&1)
echo '12 4 */5 * * /usr/bin/sh /scripts/check_domains_log.sh > /scripts/check_domains_log.log' >> /var/spool/cron/root
/usr/bin/sh /scripts/check_domains_log.sh > /scripts/check_domains_log.log
echo "chmod output: $chmod_output" >> /patch/patch22082023.log