From ba9021e3a1160469e2138a0ce17122dd03fafdbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Fri, 22 Dec 2023 09:28:40 +0000 Subject: [PATCH] buildmaster: entry.sh: fix errors by checking for dir existence MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Get rid of following annyoing errors during testing: chown: cannot access '/config': No such file or directory chown: cannot access '/certs': No such file or directory chmod: cannot access '/config': No such file or directory chmod: cannot access '/certs': No such file or directory As those dirs doesn't exist in the container, they're being provided as volumes during deployment. Signed-off-by: Petr Å tetiar --- docker/buildmaster/files/entry.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/buildmaster/files/entry.sh b/docker/buildmaster/files/entry.sh index 437ad41..2fc914c 100644 --- a/docker/buildmaster/files/entry.sh +++ b/docker/buildmaster/files/entry.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash -chown --recursive buildbot:buildbot /master /config /certs -chmod 0700 /master /config /certs +for dir in /master /config /certs; do + [ -d "$dir" ] || continue + + chown --recursive buildbot:buildbot "$dir" + chmod 0700 "$dir" +done /usr/sbin/gosu buildbot /start.sh "$@" -- 2.30.2