Try to ensure that the directories our config files want to live in exist.
[openresolv] / pdns_recursor.in
index e7aa40e1eca171a737e137608caeffa9a4bed10a..04ee6073555ed0dab48c5d3946fa0968f24f88e1 100644 (file)
@@ -57,6 +57,13 @@ for d in $DOMAINS; do
        [ -n "$newns" ] && newzones="$newzones${d%%:*}=$newns$NL"
 done
 
+# Try to ensure that config dirs exist
+if type config_mkdirs >/dev/null 2>&1; then
+       config_mkdirs "$pdnsd_zones"
+else
+       @PREFIX@/sbin/resolvconf -D "$pdnsd_zones"
+fi
+
 if [ ! -f "$pdns_zones" ] || \
        [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ]
 then