From: Petr Štetiar Date: Fri, 22 Dec 2023 09:28:40 +0000 (+0000) Subject: buildmaster: entry.sh: fix errors by checking for dir existence X-Git-Tag: v11~2 X-Git-Url: http://git.openwrt.org/openwrt/openwrt.git%24%28filter-out?a=commitdiff_plain;h=ba9021e3a1160469e2138a0ce17122dd03fafdbd;p=buildbot.git buildmaster: entry.sh: fix errors by checking for dir existence 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 --- 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 "$@"