diff options
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.newipsecdns | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/rc.newipsecdns b/etc/rc.newipsecdns index 141f04a..2e53f99 100755 --- a/etc/rc.newipsecdns +++ b/etc/rc.newipsecdns @@ -43,10 +43,7 @@ while (file_exists("{$g['varrun_path']}/booting")) { sleep(1); } - while(stristr(shell_exec("/bin/ps auxww"), "rc.newipsecdns")) { - // log_error("There is an existing rc.newipsecdns running, sleeping 1 second"); - sleep(1); - } + $ipseclck = lock('ipsecdns', LOCK_EX); log_error("IPSEC: One or more IPsec tunnel endpoints has changed its IP. Refreshing."); /* We will walk the list of hostnames found in the ipsec tunnel @@ -59,4 +56,6 @@ vpn_ipsec_configure(); filter_configure(); + + unlock($ipseclck); ?> |