containers/postfix/entrypoint.sh
Stefan Harmuth 460cd898bd
All checks were successful
Build OCI Containers / Build Containers (push) Successful in 1m2s
copy configs first, manipulate later - cannot change configmap mounts
2024-03-09 17:53:16 +01:00

15 lines
361 B
Bash

#!/usr/bin/env bash
for cf in /postfix-config/*.cf; do
cat ${cf} > /etc/postfix/`basename ${cf}`;
done
for cf in /etc/postfix/*.cf; do
sed -iE -e 's/%DB_PASSWORD%/${DB_PASSWORD}/g' \
-e 's/%DB_HOST%/${DB_HOST}/g' \
-e 's/%DB_USER%/${DB_USER}/g' \
-e 's/%DB_DATABASE%/${DB_DATABASE}/g' ${cf};
done
/usr/sbin/postfix start-fg