postgres/example/prep.d/mv_conf.sh

20 lines
339 B
Bash
Executable File

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