if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then
    if [ -x "/usr/bin/svctl" ]; then
        # NOTE: unlike invoke-rc.d, this never consults /usr/sbin/policy-rc.d, so there's
        # no standard way for a caller (e.g. a config management run still in progress) to
        # suppress this start. A consumer that needs the unit to not come up on install can
        # still pre-empt it today by touching /usr/lib/s6-rc/masked/<unit> before this package
        # installs - svctl-enable (below) refuses to enable anything already masked there.
        # restart service if either it is enabled or running
        for unit in #UNITFILES#; do
            if svctl isenabled $unit >/dev/null 2>&1 || svctl isup $unit >/dev/null 2>&1; then
                if ! svctl restart $unit; then
                    echo "dh-s6: WARNUNG 'svctl restart $unit' ist fehlgeschlagen (die Meldung" >&2
                    echo "dh-s6: WARNUNG darueber nennt den Zustand). Das Paket bleibt konfiguriert --" >&2
                    echo "dh-s6: WARNUNG ein Dienst, der nicht hochkommt, darf dpkg nicht auf 'iF'" >&2
                    echo "dh-s6: WARNUNG stehen lassen. Der Dienst laeuft dann aber NICHT." >&2
                fi
            fi
        done
    fi
fi
