sysmgr

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

commit efc5621b445ad7b5213120a277cc64e9a32c0781
parent b735a390a12fcd739224c87c8b67c9a57b8e3937
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon, 13 Apr 2020 16:01:35 +0300

svctl: better argument processing

Diffstat:
Msysmgr | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sysmgr b/sysmgr @@ -199,8 +199,12 @@ fn_runsyssv() { } fn_svctl() { + # Check if the RUNDIR exists [ -d "$RUNDIR" ] || die "$RUNDIR could not be found, are you sure sysmgr is running?" - job="$1"; shift ; [ "$1" ] || usage + + # Check that there are at least two arguments, + # get the first argument into a job variable. + [ "$2" ] || usage; job="$1"; shift for service; do # This will retrieve the process id from the service directory. getpid "$service"