#!/bin/sh # busybox init's ::shutdown action, run before init signals every process: # take each service in the directory (default /var/service) down through its # runsv. sv sends TERM and CONT, waits up to 7 seconds, then KILLs what is up. dir=${1:-/var/service} set -- "$dir"/* [ -e "$1" ] || exit 0 echo "brintos-runit-stop: stopping $#" sv -w 7 force-stop "$@" exit 0