diff options
author | jim-p <jimp@pfsense.org> | 2017-04-03 15:33:15 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-04-03 15:33:15 -0400 |
commit | f9269345c359d9c73f135005073601e3c56a4d7c (patch) | |
tree | 88ae87871f560605cab9a6a7ba540c018dcf624e /src/etc/inc/service-utils.inc | |
parent | 633d1cd9cf2b7e42fd1accfd41b5dc9a439e9bf8 (diff) | |
parent | aeaf7ad94e2a73629319094f2ba80cc24a11616e (diff) | |
download | pfsense-f9269345c359d9c73f135005073601e3c56a4d7c.zip pfsense-f9269345c359d9c73f135005073601e3c56a4d7c.tar.gz |
Merge pull request #3567 from doktornotor/patch-6
Diffstat (limited to 'src/etc/inc/service-utils.inc')
-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 677036c..5b5789a 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'])) { @@ -570,7 +577,6 @@ function service_control_start($name, $extras) { captiveportal_init_webgui_zonename($zone); break; case 'ntpd': - case 'openntpd': system_ntp_configure(); break; case 'dpinger': @@ -620,6 +626,9 @@ function service_control_start($name, $extras) { relayd_configure(); filter_configure(); break; + case 'syslogd': + system_syslogd_start(); + break; default: start_service($name); break; @@ -688,7 +697,17 @@ function service_control_stop($name, $extras) { } break; case 'relayd': - mwexec('pkill relayd'); + sigkillbyname("relayd", "TERM"); + 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); @@ -760,6 +779,9 @@ function service_control_restart($name, $extras) { relayd_configure(true); filter_configure(); break; + case 'syslogd': + system_syslogd_start(); + break; default: restart_service($name); break; |