summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/vpn.inc7
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");
}
}
OpenPOWER on IntegriCloud