aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/etc/rc.common8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common
index e950ec209d..d747303844 100755
--- a/package/base-files/files/etc/rc.common
+++ b/package/base-files/files/etc/rc.common
@@ -126,6 +126,7 @@ extra_command "enabled" "Check if service is started on boot"
extra_command "running" "Check if service is running"
extra_command "status" "Service status"
extra_command "trace" "Start with syscall trace"
+ extra_command "info" "Dump procd service info"
. $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript")
@@ -149,6 +150,13 @@ extra_command "enabled" "Check if service is started on boot"
start "$@"
}
+ info() {
+ json_init
+ json_add_string name "$(basename ${basescript:-$initscript})"
+ json_add_boolean verbose "1"
+ _procd_ubus_call list
+ }
+
stop() {
procd_lock
stop_service "$@"