fix(sql): mail settings

pull/3/head
Hardware 2016-08-03 21:52:59 +02:00
parent 00c6ed407b
commit 8cbb560f59
No known key found for this signature in database
GPG Key ID: EC6DF6F90263EDEA
2 changed files with 5 additions and 4 deletions

View File

@ -1,9 +1,9 @@
INSERT INTO `flarum`.`settings`(`key`,`value`) VALUES INSERT INTO `{{ DB_NAME }}`.`settings`(`key`,`value`) VALUES
('mail_host','{{ MAIL_HOST }}'), ('mail_host','{{ MAIL_HOST }}'),
('mail_port','{{ MAIL_PORT }}'), ('mail_port','{{ MAIL_PORT }}'),
('mail_username','{{ MAIL_USER }}'), ('mail_username','{{ MAIL_USER }}'),
('mail_password','{{ MAIL_PASS }}'), ('mail_password','{{ MAIL_PASS }}'),
('mail_encryption','{{ MAIL_ENCR }}'); ('mail_encryption','{{ MAIL_ENCR }}');
UPDATE `flarum`.`settings` SET `value`='smtp' WHERE `key`='mail_driver'; UPDATE `{{ DB_NAME }}`.`settings` SET `value`='smtp' WHERE `key`='mail_driver';
UPDATE `flarum`.`settings` SET `value`='{{ MAIL_FROM }}' WHERE `key`='mail_from'; UPDATE `{{ DB_NAME }}`.`settings` SET `value`='{{ MAIL_FROM }}' WHERE `key`='mail_from';

View File

@ -49,7 +49,8 @@ chown -R flarum:flarum .
if [ ! -e 'assets/rev-manifest.json' ]; then if [ ! -e 'assets/rev-manifest.json' ]; then
# Mail settings # Mail settings
sed -i -e "s|{{ MAIL_FROM }}|${MAIL_FROM}|g" \ sed -i -e "s|{{ DB_NAME }}|${DB_NAME}|g" \
-e "s|{{ MAIL_FROM }}|${MAIL_FROM}|g" \
-e "s|{{ MAIL_HOST }}|${MAIL_HOST}|g" \ -e "s|{{ MAIL_HOST }}|${MAIL_HOST}|g" \
-e "s|{{ MAIL_PORT }}|${MAIL_PORT}|g" \ -e "s|{{ MAIL_PORT }}|${MAIL_PORT}|g" \
-e "s|{{ MAIL_USER }}|${MAIL_USER}|g" \ -e "s|{{ MAIL_USER }}|${MAIL_USER}|g" \