diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-07-14 10:19:42 +0200 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-07-14 10:20:29 +0200 |
commit | 2b8c84e6bc3ebc1801c55030b78c4e33419d7816 (patch) | |
tree | b9044c9240e05ef1ff037aa7daafb43c42241604 /etc | |
parent | ffaa337197c284971eb950fb171e2419486516b3 (diff) | |
download | pfsense-2b8c84e6bc3ebc1801c55030b78c4e33419d7816.zip pfsense-2b8c84e6bc3ebc1801c55030b78c4e33419d7816.tar.gz |
Switch over the dns list from arguments to dnswatch to a file which holds them which dnswatch will use.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/vpn.inc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 74371d9..dd2dbd4 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -849,12 +849,11 @@ EOD; $hostnames = ""; array_unique($dnswatch_list); - foreach ($dnswatch_list as $dns) - $hostnames .= " " . escapeshellarg($dns); + $hostnames = implode("\n", $dnswatch_list); + file_put_contents("{$g['varetc_path']}/dnswatch-ipsec.hosts", $hostnames); killbypid("{$g['varrun_path']}/dnswatch-ipsec.pid"); - mwexec("/usr/local/sbin/dnswatch {$g['varrun_path']}/dnswatch-ipsec.pid $interval " . - escapeshellarg("/etc/rc.newipsecdns") . $hostnames); + mwexec("/usr/local/sbin/dnswatch {$g['varrun_path']}/dnswatch-ipsec.pid $interval /etc/rc.newipsecdns {$g['varetc_path']}/dnswatch-ipsec.hosts"); } } |