1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #44165 from thaJeztah/22.06_backport_sysvinit_debian_restart

[22.06 backport] fix debian sysvinit script fails to restart docker daemon when stopped
This commit is contained in:
Sebastiaan van Stijn 2022-09-21 23:32:33 +02:00 committed by GitHub
commit 49a2f5c55c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,7 +131,7 @@ case "$1" in
restart)
check_init
fail_unless_root
docker_pid=$(cat "$DOCKER_SSD_PIDFILE" 2> /dev/null)
docker_pid=$(cat "$DOCKER_SSD_PIDFILE" 2> /dev/null || true)
[ -n "$docker_pid" ] \
&& ps -p $docker_pid > /dev/null 2>&1 \
&& $0 stop