3 # we use this to boot up cause runit will not handle TERM and will not exit when done
8 ls /etc
/service | SHELL
=/bin
/sh parallel sv force-stop
{}
12 # give stuff a bit of time to finish
15 ORPHANS
=`ps -eo pid | grep -v PID | tr -d ' ' | grep -v '^1$'`
16 SHELL
=/bin
/bash parallel
'timeout 5 /bin/bash -c "kill {} && wait {}" || kill -9 {}' ::: $ORPHANS 2> /dev
/null
20 /etc
/runit
/1 ||
exit $?
23 echo "Started runsvdir, PID is $RUNSVDIR"
24 trap shutdown SIGTERM SIGHUP