Merge pull request #27722 from micro-jumbo/master

Stop returns 0 when docker service was not running
Upstream-commit: 0525a5d72937d012d12704707dbbd80a6a09da38
Component: engine
This commit is contained in:
Brian Goff
2016-12-21 16:08:04 -05:00
committed by GitHub

View File

@ -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)