sysmgr

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

commit b410e53373d1b12c0730a396aea52ea03b838e64
parent 1a86527cb44dbeff10cb7c2cc203519f283e36c8
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon, 13 Apr 2020 15:12:46 +0300

sysmgr: add comments to svctl

Diffstat:
Msysmgr | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/sysmgr b/sysmgr @@ -201,7 +201,9 @@ fn_svctl() { [ -d "$RUNDIR" ] || die "$RUNDIR could not be found, are you sure sysmgr is running?" job="$1"; shift ; [ "$1" ] || usage for service; do + # This will retrieve the process id from the service directory. getpid "$service" + case "$job" in stat|status) # Out function will not give an error, so we don't @@ -225,6 +227,8 @@ fn_svctl() { up|start) rm -rf "${RUNDIR:?}/$service" ;; once) + # This will place a lockfile upon start, so sysmgr + # will not attempt to restart it, if it goes down. fn_svctl start "$service" sleep 1 log once > "${RUNDIR:?}/$service/lock"