sysmgr

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

commit 8f94a2c852f4134d593d64d1b1a09db1d131649a
parent fd0bfa7a8a6ed029b930764f47e78ebfd356399e
Author: Cem Keylan <cem@ckyln.com>
Date:   Tue, 25 Feb 2020 18:14:57 +0300

print all to stderr, remove '->' for cleaner logging

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

diff --git a/sysmgr b/sysmgr @@ -16,13 +16,9 @@ ########################################################### -# Shellcheck gives an error telling us that 'printf ->' is -# undefined, but since we do want to print '->' this can -# be safely ignored. -# shellcheck disable=SC2039 -out() { printf '-> %s\n' "$@" ;} -error() { printf '-> error: %s\n' "$@" ;} -die() { printf '-> error: %s\n' "$@" "exiting..." ; exit 1 ;} +out() { printf '%s\n' "$@" >&2 ;} +error() { printf 'error: %s\n' "$@" >&2 ;} +die() { printf 'error: %s\n' "$@" "exiting..." >&2 ; exit 1 ;} RUNDIR="${RUNDIR:-/run/sysmgr}" SYSDIR="${SYSDIR:-/var/sysmgr}"