pdns_recursor needs the same restart command treatment.
authorRoy Marples <roy@marples.name>
Mon, 1 Aug 2016 19:24:57 +0000 (19:24 +0000)
committerRoy Marples <roy@marples.name>
Mon, 1 Aug 2016 19:24:57 +0000 (19:24 +0000)
Thanks to Guy Yur.

pdns_recursor.in

index 2919e7d0ff378f910138be754f50b93cb6024ce8..ad2d922dc4de094a9c12db6f905f935052b30821 100644 (file)
@@ -34,7 +34,6 @@ NL="
 "
 
 : ${pdns_service:=pdns_recursor}
 "
 
 : ${pdns_service:=pdns_recursor}
-: ${pdns_restart:=@RESTARTCMD ${pdns_service}@}
 
 newzones=
 
 
 newzones=
 
@@ -68,5 +67,12 @@ if [ ! -f "$pdns_zones" ] || \
        [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ]
 then
        printf %s "$newzones" >"$pdns_zones"
        [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ]
 then
        printf %s "$newzones" >"$pdns_zones"
-       eval $pdns_restart
+       if [ -n "$pdns_restart" ]; then
+               eval $pdns_restart
+       elif [ -n "$RESTARTCMD" ]; then
+               set -- ${pdns_service}
+               eval $RESTARTCMD
+       else
+               @SBINDIR@/resolvconf -r ${pdns_service}
+       fi
 fi
 fi