Fix runit support, [b04ffa58a4].
authorRoy Marples <roy@marples.name>
Tue, 29 Nov 2016 11:28:40 +0000 (11:28 +0000)
committerRoy Marples <roy@marples.name>
Tue, 29 Nov 2016 11:28:40 +0000 (11:28 +0000)
resolvconf.in

index c555b341624bcf47359e64517198309ab6bb847e..b650c4a1184985752819a9da1e474add1b68d7f1 100644 (file)
@@ -326,9 +326,9 @@ fi"
        /usr/sbin/service \$1 restart;
 fi"
        elif [ -x /bin/sv ]; then
-               RESTARTCMD="/bin/sv try-restart \$1"
+               RESTARTCMD="/bin/sv status \$1 >/dev/null 2>&1 && /bin/sv try-restart \$1"
        elif [ -x /usr/bin/sv ]; then
-               RESTARTCMD="/usr/bin/sv try-restart \$1"
+               RESTARTCMD="/usr/bin/sv status \$1 >/dev/null 2>&1 && /usr/bin/sv try-restart \$1"
        elif [ -e /etc/arch-release -a -d /etc/rc.d ]; then
                RCDIR=/etc/rc.d
                RESTARTCMD="if [ -e /var/run/daemons/\$1 ]; then