Commit e4e8e26f authored by AdSchellevis's avatar AdSchellevis

captive portal, check if pid file exists before kill

parent f0b6829f
......@@ -404,8 +404,11 @@ function captiveportal_configure_zone($cpcfg) {
unlink_if_exists("{$g['vardb_path']}/captiveportal{$cpzone}.db");
} else
captiveportal_syslog("Reconfiguring captive portal({$cpcfg['zone']}).");
/* kill any running minicron */
killbypid("{$g['varrun_path']}/cp_prunedb_{$cpzone}.pid");
if (file_exists("/var/run/cp_prunedb_{$cpzone}.pid")) {
killbypid("/var/run/cp_prunedb_{$cpzone}.pid");
}
/* initialize minicron interval value */
$croninterval = $cpcfg['croninterval'] ? $cpcfg['croninterval'] : 60;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment