aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libs/services.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/services.php b/libs/services.php
index a3f9e94..0c593cf 100644
--- a/libs/services.php
+++ b/libs/services.php
@@ -5,7 +5,7 @@ $Config = new Config();
$datas = array();
-$available_protocols = array('tcp', 'udp', 'unix');
+$available_protocols = array('tcp', 'udp', 'unix', 'systemd');
$show_port = $Config->get('services:show_port');
@@ -25,9 +25,12 @@ if (count($Config->get('services:list')) > 0)
else
$status = 0;
}
- else {
+ elseif ($protocol == 'systemd') {
$status = Misc::systemdServiceActive($host) ? 1 : 0;
}
+ else {
+ throw new Exception('Invalid protocol: ' . $protocol);
+ }
$datas[] = array(
'port' => $show_port === true ? $port : '',