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

This commit is contained in:
Ermal LUÇI 2015-04-24 16:54:51 +02:00
parent 2334aff978
commit 6ed34650a7

View File

@ -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);
}