Do not try to reload apinger config but always kill the running process and start a new one so it behaves.

This commit is contained in:
Ermal 2010-07-20 19:57:36 +00:00
parent 1a8bf19a68
commit 20f26a5043

View File

@ -235,16 +235,13 @@ EOD;
fwrite($fd, $apingerconfig);
fclose($fd);
if (is_process_running("apinger")) {
sigkillbypid("{$g['varrun_path']}/apinger.pid", "HUP");
} else {
if (is_dir("{$g['tmp_path']}"))
chmod("{$g['tmp_path']}", 01777);
if (is_dir("{$g['vardb_path']}/rrd"))
chown("{$g['vardb_path']}/rrd", "nobody");
/* start a new apinger process */
mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
}
killbypid("{$g['varrun_path']}/apinger.pid");
if (is_dir("{$g['tmp_path']}"))
chmod("{$g['tmp_path']}", 01777);
if (is_dir("{$g['vardb_path']}/rrd"))
chown("{$g['vardb_path']}/rrd", "nobody");
/* start a new apinger process */
mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
return 0;
}