feat: Check that LDM_AUTH holds valid basic auth users

This commit is contained in:
Pierre Delpy
2026-11-26 10:31:11 +01:00
parent f395330d19
commit 6c88dadeae
+7
View File
@@ -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"