From 211b3288f57be3bcb33894712774a9b0dfbb3777 Mon Sep 17 00:00:00 2001 From: Mart124 <37041094+Mart124@users.noreply.github.com> Date: Mon, 1 Jun 2020 15:31:11 +0200 Subject: [PATCH] Do not restart if update not needed (#758) * Do not restart if update not needed * Do not restart if update not needed --- scripts/run.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/run.sh b/scripts/run.sh index 83e7e99b83..c47bec787b 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -210,6 +210,14 @@ then updateDatabase elif [ "$1" == "update" ] then + CORE_ID=$(docker-compose ps -q admin) + WEB_ID=$(docker-compose ps -q web) + if docker inspect --format='{{.Config.Image}}:' $CORE_ID | grep -F ":$COREVERSION:" | grep -q ":[0-9.]*:$" && + docker inspect --format='{{.Config.Image}}:' $WEB_ID | grep -F ":$WEBVERSION:" | grep -q ":[0-9.]*:$" + then + echo "Update not needed" + exit + fi dockerComposeDown update withpull restart