Skip to content

Commit

Permalink
buildmaster: entry.sh: fix errors by checking for dir existence
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ynezz committed Dec 22, 2023
1 parent 40a52f0 commit 6b1cf25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docker/buildmaster/files/entry.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit 6b1cf25

Please sign in to comment.