base-files: protect stop and reload actions with procd_lock
Signed-off-by: Roman Yeryomin <roman@advem.lv> Signed-off-by: Andrejs Hanins <ahanins@gmail.com>
This commit is contained in:
parent
e410f785a4
commit
8b477d09d1
@ -127,12 +127,14 @@ ${INIT_TRACE:+set -x}
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
procd_lock
|
||||||
stop_service "$@"
|
stop_service "$@"
|
||||||
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
if eval "type reload_service" 2>/dev/null >/dev/null; then
|
if eval "type reload_service" 2>/dev/null >/dev/null; then
|
||||||
|
procd_lock
|
||||||
reload_service "$@"
|
reload_service "$@"
|
||||||
else
|
else
|
||||||
start
|
start
|
||||||
|
Loading…
Reference in New Issue
Block a user