sysmgr

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

commit 663202d1c4f9fce0c01a04bf0be5857cd02ea8ec
parent bd3106373453ff27107f1d93e3628d033696b3d4
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue,  7 Jul 2020 14:54:20 +0300

svctl status: use if statement

Diffstat:
Msysmgr | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sysmgr b/sysmgr @@ -197,9 +197,11 @@ fn_svctl() { case "$job" in stat|status) - # shellcheck disable=2015 - checkprocess "$pid" && out "$service: OK" || - out "$service: DOWN" + if checkprocess "$pid"; then + out "$service: OK" + else + out "$service: DOWN" + fi ;; restart) fn_svctl kill "$service"