fix autoreboot crontab not restart issue (#3770)

This commit is contained in:
brucewzp 2020-03-13 12:21:36 +08:00 committed by GitHub
parent abdf32b331
commit 103ba3bf97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,10 +19,12 @@ run_reboot()
week="*"
fi
sed -i '/reboot/d' /etc/crontabs/root >/dev/null 2>&1
/etc/init.d/cron restart
echo "$minute $hour * * $week sleep 5 && touch /etc/banner && reboot" >> /etc/crontabs/root
echo "Auto REBOOT has started."
else
sed -i '/reboot/d' /etc/crontabs/root >/dev/null 2>&1
/etc/init.d/cron restart
echo "Auto REBOOT has started."
fi
}