socklog.socklog-unix.init 712 Bytes
Newer Older
Mathieu Mirmont's avatar
Mathieu Mirmont committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#!/usr/bin/env /lib/init/init-d-script
#
### BEGIN INIT INFO
# Provides:          socklog-unix
# Required-Start:    $time $local_fs
# Required-Stop:     $time $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: system log service
### END INIT INFO
#
NAME='socklog-unix'
DESC='system log service'
DAEMON=/usr/sbin/socklog

do_start_cmd_override () {
    daemon --noconfig --name "$NAME" --	/usr/bin/runsv "/etc/sv/$NAME"
}

do_stop_cmd_override () {
    daemon --noconfig --name "$NAME" --stop
}

do_status_override () {
    if daemon --noconfig --name "$NAME" --running; then
	log_success_msg "$NAME is running"
    else
        log_failure_msg "$NAME is not running"
    fi
}