mirror of
https://github.com/samply/bridgehead.git
synced 2026-11-26 19:46:02 +01:00
feat: Check that LDM_AUTH holds valid basic auth users
This commit is contained in:
@@ -57,6 +57,13 @@ for DIR in /srv/docker/bridgehead /etc/bridgehead; do
|
|||||||
fi
|
fi
|
||||||
done
|
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 [ -d "/etc/bridgehead/.git" ]; then
|
||||||
if [ -z "$(git -C "/etc/bridgehead" status --porcelain)" ]; then
|
if [ -z "$(git -C "/etc/bridgehead" status --porcelain)" ]; then
|
||||||
report OK "The config repo at /etc/bridgehead is clean"
|
report OK "The config repo at /etc/bridgehead is clean"
|
||||||
|
|||||||
Reference in New Issue
Block a user