summaryrefslogtreecommitdiffstats
path: root/etc/rc.newwanip
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-12-03 22:22:14 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-12-03 22:22:14 +0000
commitae87302ce6a11cd193ba23a8385d51d86bf6c4b8 (patch)
tree4d391ef82934d602204ec91bb3cfa40d16cdfd74 /etc/rc.newwanip
parent7d5b8f4a0df22c3e3dc4ba61fce6aafc365b7ce5 (diff)
downloadpfsense-ae87302ce6a11cd193ba23a8385d51d86bf6c4b8.zip
pfsense-ae87302ce6a11cd193ba23a8385d51d86bf6c4b8.tar.gz
Work around the fact that check_reload_status is inheriting socket descriptors from other programs. Kill check_reload_status on wan ip change and restart it. That way openvpn can be killed and restarted, etc.
In addition while I am here, we really should restart openvpn after WAN ip changes as well.
Diffstat (limited to 'etc/rc.newwanip')
-rwxr-xr-xetc/rc.newwanip12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip
index 8686d32..d626aea 100755
--- a/etc/rc.newwanip
+++ b/etc/rc.newwanip
@@ -36,6 +36,15 @@ require_once("globals.inc");
require_once("config.inc");
require_once("functions.inc");
+log_error("Informational: rc.newwanip is starting.");
+
+/* hack! xxx: needs to be fixed. check_reload_status is inheriting
+ * stocket descriptors from openvpn, etc.
+ */
+system("/usr/bin/killall -9 check_reload_status");
+sleep(1);
+system("/usr/local/sbin/check_reload_status");
+
/* WAN IP address has changed */
$argument = str_replace("\n", "", $argv[1]);
@@ -71,6 +80,9 @@ if($old_ip) {
/* reconfigure IPsec tunnels */
vpn_ipsec_configure(true);
+/* start OpenVPN server & clients */
+openvpn_resync_all();
+
/* regenerate resolv.conf if DNS overrides are allowed or the BigPond
client is enabled */
if (isset($config['system']['dnsallowoverride']) ||
OpenPOWER on IntegriCloud