5 # Required-Start: $remote_fs $syslog nftables
6 # Required-Stop: $remote_fs $syslog nftables
7 # Default-Start: 2 3 4 5
9 # Short-Description: Start s6 service supervision suite
10 # Description: Start s6 service supervision suite
14 DESC="s6 system service supervision suite"
15 DAEMON="/usr/local/bin/s6-svscanboot"
16 SCANDIR="/etc/s6-scandir/"
17 DAEMON_ARGS=${SCANDIR}
18 SCRIPTNAME="/etc/init.d/${NAME}"
20 test -x $DAEMON || exit 0
22 if test -f /etc/default/${NAME}; then
23 . /etc/default/${NAME}
27 . /lib/lsb/init-functions
31 if $0 status > /dev/null ; then
32 log_success_msg "$NAME is already running"
34 log_daemon_msg "Starting ${DESC}" "${NAME}"
35 /sbin/start-stop-daemon \
39 --pidfile /run/s6-svscan.pid \
41 --chdir "${SCANDIR}" \
48 log_daemon_msg "Stopping ${DESC}" "${NAME}"
49 /usr/bin/s6-svscanctl -t "${SCANDIR}"
50 if test $? = 111; then
51 /sbin/start-stop-daemon \
55 --pidfile /run/s6-svscan.pid \
56 --retry TERM/60/KILL/10 \
57 --exec /usr/bin/s6-svscan
58 /sbin/start-stop-daemon \
62 --exec /usr/bin/s6-supervise
75 /usr/bin/s6-svscanctl "${SCANDIR}"
79 log_success_msg "$NAME is running"
83 log_failure_msg "$NAME is not running"
87 log_failure_msg "$NAME has some problem, exit code was ${exitcode}"
93 echo "Usage: ${SCRIPTNAME} {start|stop|restart|force-reload|status}"