containers/postfix/entrypoint.sh
Stefan Harmuth c77c7494da
All checks were successful
Build OCI Containers / Build Containers (push) Successful in 1m5s
quoting is hard
2024-03-09 18:28:15 +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