aboutsummaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-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..c61ac38 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,8 +25,11 @@ if (count($Config->get('services:list')) > 0)
else
$status = 0;
}
+ elseif ($protocol == 'systemd') {
+ $status = Misc::systemdServiceActive($host) ? 0 : 1;
+ }
else {
- $status = Misc::systemdServiceActive($host) ? 1 : 0;
+ throw new Exception('Invalid protocol: ' . $protocol);
}
$datas[] = array(