mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Reload apinger now that we can rather than restarting. Related to Ticket #3119
This commit is contained in:
parent
e2967ba637
commit
cb9799d5df
@ -240,7 +240,6 @@ EOD;
|
||||
@file_put_contents("{$g['varetc_path']}/apinger.conf", $apingerconfig);
|
||||
unset($apingerconfig);
|
||||
|
||||
killbypid("{$g['varrun_path']}/apinger.pid");
|
||||
if (is_dir("{$g['tmp_path']}"))
|
||||
chmod("{$g['tmp_path']}", 01777);
|
||||
if (!is_dir("{$g['vardb_path']}/rrd"))
|
||||
@ -248,12 +247,16 @@ EOD;
|
||||
|
||||
@chown("{$g['vardb_path']}/rrd", "nobody");
|
||||
|
||||
/* start a new apinger process */
|
||||
@unlink("{$g['varrun_path']}/apinger.status");
|
||||
sleep(1);
|
||||
mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
|
||||
sleep(1);
|
||||
sigkillbypid("{$g['varrun_path']}/apinger.pid", "USR1");
|
||||
if (isvalidpid("{$g['varrun_path']}/apinger.pid"))
|
||||
sigkillbypid("{$g['varrun_path']}/apinger.pid", "HUP");
|
||||
else {
|
||||
/* start a new apinger process */
|
||||
@unlink("{$g['varrun_path']}/apinger.status");
|
||||
sleep(1);
|
||||
mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
|
||||
sleep(1);
|
||||
sigkillbypid("{$g['varrun_path']}/apinger.pid", "USR1");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user