From b9cfa851bd89edda5a754f3fe53d400d88b8933b Mon Sep 17 00:00:00 2001 From: mag37 Date: Sat, 11 Feb 2023 23:46:56 +0100 Subject: [PATCH] cd to compose-file extras Added some error handling of the new cd-line, if the cd breaks for some reason that container will be skipped with a message. --- dockcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockcheck.sh b/dockcheck.sh index 1df7826..826a036 100755 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -165,7 +165,7 @@ if [ -n "$GotUpdates" ] ; then else ComposeFile="$ContPath/$ContConfigFile" fi - cd "$(dirname "${ComposeFile}")" + cd "$(dirname "${ComposeFile}")" || { echo "Compose-file path error - skipping $i" ; continue ; } $DockerBin -f "$ComposeFile" pull "$ContName" $DockerBin -f "$ComposeFile" up -d "$ContName" done