diff options
-rw-r--r-- | etc/inc/service-utils.inc | 19 | ||||
-rw-r--r-- | usr/local/www/shortcuts.inc | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 278f9f0..19b247f 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -43,6 +43,7 @@ require_once("openvpn.inc"); require_once("ipsec.inc"); require_once("vpn.inc"); require_once("vslb.inc"); +require_once("gwlb.inc"); define("RCFILEPREFIX", "/usr/local/etc/rc.d/"); function write_rcfile($params) { @@ -304,6 +305,14 @@ function get_services() { $services[] = $pconfig; } + $gateways_arr = return_gateways_array(); + if (is_array($gateways_arr)) { + $pconfig = array(); + $pconfig['name'] = "apinger"; + $pconfig['description'] = gettext("Gateway Monitoring Daemon"); + $services[] = $pconfig; + } + if(isset($config['snmpd']['enable'])) { $pconfig = array(); $pconfig['name'] = "bsnmpd"; @@ -515,6 +524,9 @@ function service_control_start($name, $extras) { case 'openntpd': system_ntp_configure(); break; + case 'apinger': + setup_gateways_monitor(); + break; case 'bsnmpd': services_snmpd_configure(); break; @@ -574,6 +586,9 @@ function service_control_stop($name, $extras) { case 'openntpd': killbyname("openntpd"); break; + case 'apinger': + killbypid("{$g['varrun_path']}/apinger.pid"); + break; case 'bsnmpd': killbypid("{$g['varrun_path']}/snmpd.pid"); break; @@ -637,6 +652,10 @@ function service_control_restart($name, $extras) { case 'openntpd': system_ntp_configure(); break; + case 'apinger': + killbypid("{$g['varrun_path']}/apinger.pid"); + setup_gateways_monitor(); + break; case 'bsnmpd': services_snmpd_configure(); break; diff --git a/usr/local/www/shortcuts.inc b/usr/local/www/shortcuts.inc index c02d18c..b75ea33 100644 --- a/usr/local/www/shortcuts.inc +++ b/usr/local/www/shortcuts.inc @@ -201,6 +201,7 @@ $shortcuts['gateways'] = array(); $shortcuts['gateways']['main'] = "system_gateways.php"; $shortcuts['gateways']['log'] = "diag_logs_gateways.php"; $shortcuts['gateways']['status'] = "status_gateways.php"; +$shortcuts['gateways']['service'] = "apinger"; $shortcuts['gateway-groups'] = array(); $shortcuts['gateway-groups']['main'] = "system_gateway_groups.php"; |