Correct issue with dragonfly libexecdir
[openresolv] / pdns_recursor.in
index 2919e7d0ff378f910138be754f50b93cb6024ce8..ad2d922dc4de094a9c12db6f905f935052b30821 100644 (file)
@@ -34,7 +34,6 @@ NL="
 "
 
 : ${pdns_service:=pdns_recursor}
-: ${pdns_restart:=@RESTARTCMD ${pdns_service}@}
 
 newzones=
 
@@ -68,5 +67,12 @@ if [ ! -f "$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