mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
Syslog-NG, restart both syslog daemons on service restarts to avoid communication issues. Since both services (syslog-ng, syslog) have their own status its good to show them separately, for proper functionality they should however be treated as one.
Add a stop action to prevent service stop from only stopping the service named "syslog".
This commit is contained in:
parent
6b92b81702
commit
dd01423e91
@ -82,6 +82,7 @@ function core_services()
|
||||
$services[] = array(
|
||||
'description' => gettext('Local Syslog'),
|
||||
'php' => array(
|
||||
"stop" => array('system_syslogd_stop'),
|
||||
"start" => array('system_syslogd_start'),
|
||||
"restart" => array('system_syslogd_start')
|
||||
),
|
||||
@ -92,9 +93,9 @@ function core_services()
|
||||
$services[] = array(
|
||||
'description' => gettext('Remote Syslog'),
|
||||
'mwexec' => array(
|
||||
'restart' => array('/usr/local/etc/rc.d/syslog-ng restart'),
|
||||
'start' => array('/usr/local/etc/rc.d/syslog-ng start'),
|
||||
'stop' => array('/usr/local/etc/rc.d/syslog-ng stop'),
|
||||
"stop" => array('system_syslogd_stop'),
|
||||
"start" => array('system_syslogd_start'),
|
||||
"restart" => array('system_syslogd_start')
|
||||
),
|
||||
'pidfile' => '/var/run/syslog-ng.pid',
|
||||
'name' => 'syslog-ng',
|
||||
|
||||
@ -657,6 +657,15 @@ EOD;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* stop syslog + syslog-ng
|
||||
*/
|
||||
function system_syslogd_stop()
|
||||
{
|
||||
killbypid('/var/run/syslog.pid', 'TERM', true);
|
||||
mwexecf("/usr/sbin/service syslog-ng stop");
|
||||
}
|
||||
|
||||
function system_clear_log($logfile, $restart_syslogd = true)
|
||||
{
|
||||
if ($restart_syslogd) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user