From 802fe9709ec9e2e5887e87e1047c15d90020472f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 18 Apr 2009 10:39:53 +0000 Subject: Allow user to provide custom status function and still hook into the system one --- sh/runscript.sh.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sh') diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index aaac433..c1930f2 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -46,7 +46,7 @@ describe() } # Report status -status() +_status() { if service_stopping; then ewarn "status: stopping" @@ -70,7 +70,7 @@ status() fi } -# Template start / stop functions +# Template start / stop / status functions start() { [ -n "${command}" ] || return 0 @@ -110,6 +110,11 @@ stop() eend $? "Failed to stop ${RC_SVCNAME}" } +status() +{ + _status +} + yesno ${RC_DEBUG} && set -x _conf_d=${RC_SERVICE%/*}/../conf.d -- cgit v1.2.3