Allow user to provide custom status function and still hook into the system one
This commit is contained in:
parent
657cb3a6eb
commit
802fe9709e
@ -46,7 +46,7 @@ describe()
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Report status
|
# Report status
|
||||||
status()
|
_status()
|
||||||
{
|
{
|
||||||
if service_stopping; then
|
if service_stopping; then
|
||||||
ewarn "status: stopping"
|
ewarn "status: stopping"
|
||||||
@ -70,7 +70,7 @@ status()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Template start / stop functions
|
# Template start / stop / status functions
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
[ -n "${command}" ] || return 0
|
[ -n "${command}" ] || return 0
|
||||||
@ -110,6 +110,11 @@ stop()
|
|||||||
eend $? "Failed to stop ${RC_SVCNAME}"
|
eend $? "Failed to stop ${RC_SVCNAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status()
|
||||||
|
{
|
||||||
|
_status
|
||||||
|
}
|
||||||
|
|
||||||
yesno ${RC_DEBUG} && set -x
|
yesno ${RC_DEBUG} && set -x
|
||||||
|
|
||||||
_conf_d=${RC_SERVICE%/*}/../conf.d
|
_conf_d=${RC_SERVICE%/*}/../conf.d
|
||||||
|
Loading…
Reference in New Issue
Block a user