summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2022-10-12 00:49:54 -0500
committerzachir <zachir@librem.one>2022-10-12 00:49:54 -0500
commitbf07bae38661f7a1dfb49ca25b2b1227876ed6be (patch)
tree8701ad350b7fc11f75ae2bc67230a95800c40d2f
parentc19cfb2a1d1707579dd52886d3e93a261e0e23df (diff)
add (very basic) status readout to servicectl
-rwxr-xr-xservicectl11
1 files changed, 11 insertions, 0 deletions
diff --git a/servicectl b/servicectl
index 1cc3e6f..df96506 100755
--- a/servicectl
+++ b/servicectl
@@ -75,6 +75,15 @@ disable_service () {
fi
}
+status_service () {
+ if [ -n "$S6" ]; then
+ $ROOTCMD s6-rc -a list
+ fi
+ if [ -n "$OPENRC" ]; then
+ $ROOTCMD rc-service status
+ fi
+}
+
## MAIN LOOP
case "$1" in
@@ -112,4 +121,6 @@ case "$1" in
start_service $i
done
;;
+ "status")
+ status_service
esac