sysmgr

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

commit 04934110714a996783f0af28ae827aa2afe15f7d
parent e870fb509c475659d4dd8c42f02958f4d400e85d
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri, 31 Jul 2020 19:28:00 +0300

sysmgr: don't call anything outside of functions

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

diff --git a/sysmgr b/sysmgr @@ -20,9 +20,6 @@ out() { log "$@" >&2 ;} error() { printf 'error: %s\n' "$@" >&2 ;} die() { error "$@" "exiting..." ; exit 1;} -: "${RUNDIR:=/run/sysmgr}" "${SYSDIR:=/var/sysmgr}" -version=0.3.0 - usage() { # Define a different out function just for the usage function. out() { @@ -239,6 +236,9 @@ fn_svctl() { } main() { + RUNDIR=${RUNDIR:-/run/sysmgr} SYSDIR=${SYSDIR:-/var/sysmgr} + version=0.3.0 + # Call the appropriate function depending on the name of the program. case "${0##*/}" in sysmgr) fn_sysmgr "$@" ;;