Trace: skeleton

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

skeleton.txt · Last modified: 2017/10/31 15:33
Public Domain Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain