diff --git a/lib/check-bridgehead.sh b/lib/check-bridgehead.sh index ea6bba6..0141802 100755 --- a/lib/check-bridgehead.sh +++ b/lib/check-bridgehead.sh @@ -57,6 +57,13 @@ for DIR in /srv/docker/bridgehead /etc/bridgehead; do fi done +if [[ "$LDM_AUTH" =~ ^[^:,]+:[^:,]+(,[^:,]+:[^:,]+)*$ ]]; then + report OK "LDM_AUTH holds valid basic auth users" +else + report CRIT "LDM_AUTH is empty or not a comma-separated list of user:hash entries" \ + "Hint: Remove the LDM_AUTH line from /etc/bridgehead/$PROJECT.local.conf and run '/srv/docker/bridgehead/bridgehead adduser $PROJECT' for the component LDM_AUTH." +fi + if [ -d "/etc/bridgehead/.git" ]; then if [ -z "$(git -C "/etc/bridgehead" status --porcelain)" ]; then report OK "The config repo at /etc/bridgehead is clean"