diff options
-rw-r--r-- | etc/inc/vpn.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index a6a3609..16b4bb8 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -561,11 +561,12 @@ EOD; if(is_process_running("racoon")) { /* We are already online, reload */ mwexec("/usr/local/sbin/racoonctl reload-config"); + sleep(1); + exec("/usr/bin/ps auxw | grep \"/usr/local/sbin/[r]acoon\" | awk '{print $2}'", $racoonpid); + if(! empty($racoonpid)) { + mwexec("/usr/bin/kill -HUP $racoonpid[0]"); + } } else { - /* flush SPD and SAD */ - mwexec("/sbin/setkey -FP"); - mwexec("/sbin/setkey -F"); - /* sleep for a bit */ sleep (2); |