#! /bin/sh ### BEGIN INIT INFO # Provides: reboot-chk # Required-Start: $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Check for reboot. ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/lsb/init-functions do_start() { if [ -e /var/reboot.done ]; then rm /var/reboot.done echo "$(date) - was rebooted." >> /var/log/reboot.log else echo "$(date) - reboot after normal boot in one minute." >> /var/log/reboot.log shutdown -r 1 & fi } case "$1" in start) do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac