sysmgr

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

commit b735a390a12fcd739224c87c8b67c9a57b8e3937
parent b410e53373d1b12c0730a396aea52ea03b838e64
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon, 13 Apr 2020 15:54:28 +0300

getpid: don't die, return with error

Diffstat:
Msysmgr | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sysmgr b/sysmgr @@ -105,7 +105,8 @@ term() { getpid() { # This is a function to retrieve the pid from the RUNDIR - [ -f "${RUNDIR:?}/$1/${2:-pid}" ] || die "pid file for $1 could not be found" + [ -f "${RUNDIR:?}/$1/${2:-pid}" ] || + { error "pid file for $1 could not be found" ; return 1 ;} read -r pid < "${RUNDIR:?}/$1/${2:-pid}" }