From 6ed34650a77fa09036207f62e5fcdfca291fbada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20LU=C3=87I?= Date: Fri, 24 Apr 2015 16:54:51 +0200 Subject: [PATCH] Is better to send the signal to starter rather than to charon directly. Starter manager charon properly. This should fix a lot of issues with configuration reloading that before sometimes did not work especially when changing phase2 entries --- etc/inc/vpn.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 93e1976b68..3e60e1a1b6 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -1123,11 +1123,10 @@ EOD; if ($restart === true) { mwexec("/usr/local/sbin/ipsec restart", false); } else { - if (isvalidpid("{$g['varrun_path']}/charon.pid")) { - /* Read secrets */ - mwexec("/usr/local/sbin/ipsec rereadall", false); + if (isvalidpid("{$g['varrun_path']}/starter.charon.pid")) { /* Update configuration changes */ - mwexec("/usr/local/sbin/ipsec update", false); + /* Read secrets */ + sigkillbypid("{$g['varrun_path']}/starter.charon.pid", 'USR1'); } else { mwexec("/usr/local/sbin/ipsec start", false); }