sysmgr

a simplistic service supervisor (deprecated)
git clone git://git.ckyln.com/~cem/sysmgr.git
Log | Files | Refs | README | LICENSE

commit 4f16adf8238b5ceab67d11caf6f80598fb418530
parent 8ab3ae233b1612b8fc9107ac289932f3d0626a30
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue,  7 Jul 2020 15:18:28 +0300

svctl: get the basename of services.

Diffstat:
Msysmgr | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sysmgr b/sysmgr @@ -189,8 +189,17 @@ fn_svctl() { # job variable. [ "$2" ] || usage; job="$1"; shift for service; do + + # We get the basename of the service, so that it allows a user to do + # operations such as + # + # 'svctl status /var/sysmgr/*' + # + # and get a status list of all available services. + service=${service##*/} + # This will retrieve the process id from the service directory. - getpid "${service##*/}" + getpid "$service" case "$job" in stat|status)