lemonldap-ng/example/prep.d/10-mv-conf.sh

20 lines
359 B
Bash
Executable File

#!/bin/sh
set -eu
if [ "lemonldap-ng" != "lemonldap-ng" ]; then
for DIR in vault consul nomad; do
if [ -d output/${DIR} ]; then
for FILE in $(find output/${DIR} -name "*lemonldap-ng*.hcl" -type f); do
NEW_FILE=$(echo "${FILE}" | sed -E "s/lemonldap-ng/lemonldap-ng/g")
mv "${FILE}" "${NEW_FILE}"
done
fi
done
fi