diff options
author | doktornotor <notordoktor@gmail.com> | 2017-02-21 20:38:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 20:38:22 +0100 |
commit | e3f68ab9b181ab7057f98ac0539d21ff49f72ac2 (patch) | |
tree | b109277870ba1b9b832ee32c0995438bb47e4f38 /src | |
parent | aba748830d69b05df8c4a4cee370413c91c32273 (diff) | |
download | pfsense-e3f68ab9b181ab7057f98ac0539d21ff49f72ac2.zip pfsense-e3f68ab9b181ab7057f98ac0539d21ff49f72ac2.tar.gz |
Add syslogd to Status > Services (Feature #4382)
Sort includes, use full path to pkill and remove openntpd while here.
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/service-utils.inc | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/etc/inc/service-utils.inc b/src/etc/inc/service-utils.inc index 071129d..fe3f236 100644 --- a/src/etc/inc/service-utils.inc +++ b/src/etc/inc/service-utils.inc @@ -20,13 +20,15 @@ * limitations under the License. */ -require_once("globals.inc"); require_once("captiveportal.inc"); -require_once("openvpn.inc"); +require_once("globals.inc"); +require_once("gwlb.inc"); require_once("ipsec.inc"); +require_once("openvpn.inc"); +require_once("system.inc"); +require_once("util.inc"); require_once("vpn.inc"); require_once("vslb.inc"); -require_once("gwlb.inc"); define("RCFILEPREFIX", "/usr/local/etc/rc.d/"); function write_rcfile($params) { @@ -261,6 +263,11 @@ function get_services() { $pconfig['description'] = gettext("NTP clock sync"); $services[] = $pconfig; + $pconfig = array(); + $pconfig['name'] = "syslogd"; + $pconfig['description'] = gettext("System Logger Daemon"); + $services[] = $pconfig; + if (is_array($config['captiveportal'])) { foreach ($config['captiveportal'] as $zone => $setting) { if (isset($setting['enable'])) { @@ -567,7 +574,6 @@ function service_control_start($name, $extras) { captiveportal_init_webgui_zonename($zone); break; case 'ntpd': - case 'openntpd': system_ntp_configure(); break; case 'dpinger': @@ -616,6 +622,9 @@ function service_control_start($name, $extras) { case 'relayd': relayd_configure(); break; + case 'syslogd': + system_syslogd_start(); + break; default: start_service($name); break; @@ -684,7 +693,17 @@ function service_control_stop($name, $extras) { } break; case 'relayd': - mwexec('pkill relayd'); + mwexec('/bin/pkill relayd'); + break; + case 'syslogd': + if (isvalidpid("{$g['varrun_path']}/syslog.pid")) { + sigkillbypid("{$g['varrun_path']}/syslog.pid", "TERM"); + usleep(100000); + } + if (isvalidpid("{$g['varrun_path']}/syslog.pid")) { + sigkillbypid("{$g['varrun_path']}/syslog.pid", "KILL"); + usleep(100000); + } break; default: stop_service($name); @@ -755,6 +774,9 @@ function service_control_restart($name, $extras) { case 'relayd': relayd_configure(true); break; + case 'syslogd': + system_syslogd_start(); + break; default: restart_service($name); break; |