소스 검색

Use entrypoint to sed some vars

andryyy 8 년 전
부모
커밋
d6e0c46b9a
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      data/Dockerfiles/postfix/postfix.sh

+ 4 - 0
data/Dockerfiles/postfix/postfix.sh

@@ -2,6 +2,10 @@
 
 trap "postfix stop" EXIT
 
+sed -i "/^user/c\user = ${DBUSER}" /opt/postfix/conf/sql/*
+sed -i "/^password/c\password = ${DBPASS}" /opt/postfix/conf/sql/*
+sed -i "/^dbname/c\dbname = ${DBNAME}" /opt/postfix/conf/sql/*
+
 postfix -c /opt/postfix/conf start
 
 sleep infinity