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 <ynezz@true.cz>
#!/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 "$@"