No need to specify SVCNAME anymore.
This commit is contained in:
parent
2fa0b9184d
commit
8793fb8d4c
@ -95,8 +95,8 @@ if [ -n "${command}" ]; then
|
|||||||
fi
|
fi
|
||||||
if yesno "${start_inactive}"; then
|
if yesno "${start_inactive}"; then
|
||||||
local _inactive=false
|
local _inactive=false
|
||||||
service_inactive "${SVCNAME}" && _inactive=true
|
service_inactive && _inactive=true
|
||||||
mark_service_inactive "${SVCNAME}"
|
mark_service_inactive
|
||||||
fi
|
fi
|
||||||
start-stop-daemon --start \
|
start-stop-daemon --start \
|
||||||
--exec ${command} \
|
--exec ${command} \
|
||||||
@ -107,7 +107,7 @@ if [ -n "${command}" ]; then
|
|||||||
eend $? "Failed to start ${SVCNAME}" && return 0
|
eend $? "Failed to start ${SVCNAME}" && return 0
|
||||||
if yesno "${start_inactive}"; then
|
if yesno "${start_inactive}"; then
|
||||||
if ! ${_inactive}; then
|
if ! ${_inactive}; then
|
||||||
mark_service_stopped "${SVCNAME}"
|
mark_service_stopped
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
@ -153,7 +153,7 @@ while [ -n "$1" ]; do
|
|||||||
# we can run this command
|
# we can run this command
|
||||||
for _cmd in ${extra_started_commands}; do
|
for _cmd in ${extra_started_commands}; do
|
||||||
if [ "${_cmd}" = "$1" ]; then
|
if [ "${_cmd}" = "$1" ]; then
|
||||||
if ! service_started "${SVCNAME}"; then
|
if ! service_started; then
|
||||||
eerror "${SVCNAME}: cannot \`$1' as it has not been started"
|
eerror "${SVCNAME}: cannot \`$1' as it has not been started"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -171,8 +171,7 @@ while [ -n "$1" ]; do
|
|||||||
continue 2
|
continue 2
|
||||||
else
|
else
|
||||||
if [ "${_cmd}" = "start" -o "${_cmd}" = "stop" ]; then
|
if [ "${_cmd}" = "start" -o "${_cmd}" = "stop" ]; then
|
||||||
shift
|
exit 0
|
||||||
continue 2
|
|
||||||
else
|
else
|
||||||
eerror "${SVCNAME}: function \`$1' defined but does not exist"
|
eerror "${SVCNAME}: function \`$1' defined but does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user