--- sh/runscript.sh.in 2014-09-08 21:41:13.351207527 +0100 +++ sh/runscript.sh.in 2014-09-08 21:40:59.345152895 +0100 @@ -125,6 +125,9 @@ # Template start / stop / status functions start() { + # Support re-entrant services + [ "$IN_BACKGROUND" = true ] && return 0 + [ -n "$command" ] || return 0 local _background= ebegin "Starting ${name:-$RC_SVCNAME}" @@ -164,6 +167,12 @@ stop() { + # Support re-entrant services + if [ "$IN_BACKGROUND" = true ]; then + mark_service_inactive "$RC_SVCNAME" + return 0 + fi + local startcommand="$(service_get_value "command")" local startpidfile="$(service_get_value "pidfile")" local startprocname="$(service_get_value "procname")"