Fix path of the env.conf

This commit is contained in:
Daniel Berteaud 2023-10-19 16:50:32 +02:00
parent 39072e4f06
commit a01b73a9e3
1 changed files with 3 additions and 3 deletions

View File

@ -4,11 +4,11 @@ set -euo pipefail
# Remove any line containing auth_XXX acl not present in /secrets/acl.conf
IFS=$'\n'
for LINE in $(grep -E "http_access .* auth_.*" /etc/env.conf); do
for LINE in $(grep -E "http_access .* auth_.*" /secrets/env.conf); do
ACL=$(echo ${LINE} | sed -E 's/http_access .* (auth_[^\s]+).*/\1/')
if ! grep -q ${ACL} /secrets/acl.conf; then
echo "Remove ${LINE} from /etc/env.conf because acl ${ACL} doesn't exist"
sed -i -E "/.*${ACL}.*/d" /etc/env.conf
echo "Remove ${LINE} from /secrets/env.conf because acl ${ACL} doesn't exist"
sed -i -E "/.*${ACL}.*/d" /secrets/env.conf
fi
done