summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-04-18 10:39:53 +0000
committerRoy Marples <roy@marples.name>2009-04-18 10:39:53 +0000
commit802fe9709ec9e2e5887e87e1047c15d90020472f (patch)
tree6986739bcb7ecef7e49f05680dad638cded8ae05 /sh
parent657cb3a6eb084d15121772ec13e9692a319c6fde (diff)
downloadopenrc-802fe9709ec9e2e5887e87e1047c15d90020472f.tar.gz
openrc-802fe9709ec9e2e5887e87e1047c15d90020472f.tar.bz2
openrc-802fe9709ec9e2e5887e87e1047c15d90020472f.tar.xz
Allow user to provide custom status function and still hook into the system one
Diffstat (limited to 'sh')
-rw-r--r--sh/runscript.sh.in9
1 files changed, 7 insertions, 2 deletions
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