===== skeleton a init script structure ===== #!/bin/bash ### BEGIN INIT INFO # Provides: scriptname # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO SCRIPT= RUNAS= start() { } stop() { } status() { } case "$1" in start) start ;; stop) stop ;; status) status ;; restart) stop start ;; *) echo "Usage: $0 {start|stop|restart|status}" esac ==== References ==== * https://gist.github.com/naholyr/4275302