From 8ad8c6d88777ba6d4e8563c1a93c72f2e61e20f6 Mon Sep 17 00:00:00 2001 From: Yann Autissier Date: Sat, 10 Sep 2022 13:37:19 +0000 Subject: [PATCH] fix debian sysvinit script fails to restart docker daemon when stopped Fixes: #44130 Signed-off-by: Yann Autissier --- contrib/init/sysvinit-debian/docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/init/sysvinit-debian/docker b/contrib/init/sysvinit-debian/docker index a2ba4f4b7d..90dbe3c956 100755 --- a/contrib/init/sysvinit-debian/docker +++ b/contrib/init/sysvinit-debian/docker @@ -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