Merge branch 'patch-1' of git://github.com/justb81/passbolt_docker into justb81-patch-1
This commit is contained in:
commit
2623a3742c
|
|
@ -93,6 +93,7 @@ Passbolt docker image provides several environment variables to configure differ
|
|||
* EMAIL_HOST: server hostname ( defaults to localhost)
|
||||
* EMAIL_PORT: server port ( defaults to 587)
|
||||
* EMAIL_TIMEOUT: timeout ( defaults to 30s)
|
||||
* EMAIL_AUTH: disable smtp auth ( defaults to true)
|
||||
* EMAIL_USERNAME: username for email server auth ( defaults to email_user)
|
||||
* EMAIL_PASSWORD: password for email server auth ( defaults to email_password)
|
||||
* EMAIL_TLS: set tls, boolean ( defaults to false)
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ email_setup() {
|
|||
# EMAIL_HOST
|
||||
# EMAIL_PORT
|
||||
# EMAIL_TIMEOUT
|
||||
# EMAIL_AUTH
|
||||
# EMAIL_USERNAME
|
||||
# EMAIL_PASSWORD
|
||||
# EMAIL_TLS
|
||||
|
|
@ -124,8 +125,14 @@ email_setup() {
|
|||
sed -i s:$default_host:${EMAIL_HOST:-localhost}:g $email_config
|
||||
sed -i s:$default_port:${EMAIL_PORT:-587}:g $email_config
|
||||
sed -i s:$default_timeout:${EMAIL_TIMEOUT:-30}:g $email_config
|
||||
sed -i "0,/"$default_username"/s:"$default_username":'${EMAIL_USERNAME:-email_user}':" $email_config
|
||||
sed -i "0,/"$default_password"/s:"$default_password":'${EMAIL_PASSWORD:-email_password}':" $email_config
|
||||
if [ "$EMAIL_AUTH" = "false" ] ; then
|
||||
sed -i "0,/"$default_username"/s:"$default_username":null:" $email_config
|
||||
sed -i "0,/"$default_password"/s:"$default_password":null:" $email_config
|
||||
else
|
||||
sed -i "0,/"$default_username"/s:"$default_username":'${EMAIL_USERNAME:-email_user}':" $email_config
|
||||
sed -i "0,/"$default_password"/s:"$default_password":'${EMAIL_PASSWORD:-email_password}':" $email_config
|
||||
fi
|
||||
|
||||
sed -i "0,/tls/s:false:${EMAIL_TLS:-false}:" $email_config
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue