acme-to-vault/example/prep.d/mv_conf.sh

20 lines
364 B
Bash
Executable File

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