traefik/example/prep.d/rename_policies.sh

20 lines
334 B
Bash
Raw Normal View History

2024-01-05 12:11:30 +01:00
#!/bin/sh
set -eu
if [ "traefik" != "traefik" ]; then
for DIR in vault consul nomad; do
if [ -d output/${DIR} ]; then
for FILE in $(find output/${DIR} -name "*traefik*.hcl" -type f); do
NEW_FILE=$(echo "${FILE}" | sed -E "s/traefik/traefik/g")
mv "${FILE}" "${NEW_FILE}"
done
fi
done
fi