mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Stop returns 0 when docker service was not running
In case when docker was not running init script stop was returning value <> 0. Due to this fact it was impossible to uninstall the docker-engine if the docker service was stopped. Signed-off-by: Cyprian Gracz <cyprian.gracz@micro-jumbo.eu> Fixed message logging Signed-off-by: Cyprian Gracz <cyprian.gracz@micro-jumbo.eu>
This commit is contained in:
parent
28ef366cea
commit
74cf6157ef
1 changed files with 7 additions and 3 deletions
|
@ -119,9 +119,13 @@ case "$1" in
|
|||
stop)
|
||||
check_init
|
||||
fail_unless_root
|
||||
log_begin_msg "Stopping $DOCKER_DESC: $BASE"
|
||||
start-stop-daemon --stop --pidfile "$DOCKER_SSD_PIDFILE" --retry 10
|
||||
log_end_msg $?
|
||||
if [ -f "$DOCKER_SSD_PIDFILE" ]; then
|
||||
log_begin_msg "Stopping $DOCKER_DESC: $BASE"
|
||||
start-stop-daemon --stop --pidfile "$DOCKER_SSD_PIDFILE" --retry 10
|
||||
log_end_msg $?
|
||||
else
|
||||
log_warning_msg "Docker already stopped - file $DOCKER_SSD_PIDFILE not found."
|
||||
fi
|
||||
;;
|
||||
|
||||
restart)
|
||||
|
|
Loading…
Reference in a new issue