From d212dc59718c8c8f5a09b30d7c26cffeb0408964 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 24 Mar 2010 22:04:22 +0000 Subject: Ticket #439. Make sure directory exists so files in it can be created. --- config/tinydns/tinydns.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config') diff --git a/config/tinydns/tinydns.inc b/config/tinydns/tinydns.inc index bf53051a..8953df04 100644 --- a/config/tinydns/tinydns.inc +++ b/config/tinydns/tinydns.inc @@ -212,6 +212,8 @@ function tinydns_custom_php_changeip_command() { } exec("/usr/local/bin/dnscache-conf Gdnscache Gdnslog /etc/dnscache{$dnsidx} {$dnscacheip}"); + if (!is_dir("/etc/dnscache{$dnsidx}/env/IP")) + exec("mkdir -p /etc/dnscache{$dnsidx}/env"); exec("echo {$dnscacheip} > /etc/dnscache{$dnsidx}/env/IP"); tinydns_dnscache_forwarding_servers($dnsidx); if (!is_dir("/etc/dnscache{$dnsidx}/root/ip")) -- cgit v1.2.3