if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then
    if [ -x "/usr/bin/svctl" ]; then
        # 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
                svctl restart $unit || true
            fi
        done
    fi
fi
