From 03fb0dbf4ce6c6f7f5b8a0c2da7e0df49e1444b5 Mon Sep 17 00:00:00 2001 From: makocchi-git Date: Fri, 21 Aug 2020 13:48:49 +0900 Subject: [PATCH] use is-active instead of status --- debian/postinst.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/postinst.sh b/debian/postinst.sh index d1e28e17b..6a326f823 100755 --- a/debian/postinst.sh +++ b/debian/postinst.sh @@ -21,7 +21,7 @@ fi # Update docker configuration. if [ -f /etc/docker/daemon.json ]; then runsc install - if systemctl status docker 2>/dev/null; then + if systemctl is-active -q docker; then systemctl restart docker || echo "unable to restart docker; you must do so manually." >&2 fi fi