fix autoreboot crontab not restart issue (#3770)
This commit is contained in:
parent
d34d69ef86
commit
0b4108010d
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user