needrestart
0 1 * * * /bin/bash /admin/utilidades/needreboot.sh
root@cosa:~# cat /admin/utilidades/needreboot.sh
TIME=$(( $RANDOM % 5000 ))
FLAG=/var/log/needrestart.flag
if [ -f $FLAG ]
then /bin/sleep $TIME
/bin/rm $FLAG
/sbin/reboot
fi
needrestart.txt · Last modified: by etfiat
