Skip to content

Instantly share code, notes, and snippets.

@SunDi3yansyah
Created August 31, 2014 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SunDi3yansyah/33b83dd0fa2c5213aa1c to your computer and use it in GitHub Desktop.
Save SunDi3yansyah/33b83dd0fa2c5213aa1c to your computer and use it in GitHub Desktop.
sleep and wake up again
#! /bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/lsb/init-functions
do_stop () {
log_action_msg "Will now restart"
reboot -d -f -i
}
case "$1" in
start)
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment