Commit 1743aa0f authored by Johannes Zellner's avatar Johannes Zellner

Enable sendmail support

parent cc6ba094
......@@ -19,7 +19,8 @@
"postInstallMessage": "file://POSTINSTALL.md",
"addons": {
"mysql": {},
"localstorage": {}
"localstorage": {},
"sendmail": {}
},
"mediaLinks": [
],
......
......@@ -2,6 +2,8 @@
set -eu
mysql="mysql --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST} ${MYSQL_DATABASE}"
# Do not use tmp directly due to tmpreaper removeing built assets
mkdir -p /run/sessions /run/tmp/runtime /run/tmp/assets /run/tmp/upload
chown -R www-data.www-data /run
......@@ -19,7 +21,7 @@ fi
echo "==> Ensure folders"
# It is not exactly clear why the app does not create those subfolders and we might miss some here
mkdir -p /app/data/upload /app/code/upload/admintheme /app/code/upload/themes/survey/generalfiles
mkdir -p /app/data/upload /app/code/upload/surveys /app/code/upload/admintheme /app/code/upload/themes/survey/generalfiles
echo "==> Ensure permissions"
chown -R www-data.www-data /app/data /run
......@@ -27,6 +29,13 @@ chown -R www-data.www-data /app/data /run
echo "==> Run database schema update"
sudo -u www-data php /app/code/application/commands/console.php updatedb
echo "==> Configure email"
$mysql -e "INSERT INTO lime_settings_global (stg_name, stg_value) VALUES ('emailmethod', 'smtp') ON DUPLICATE KEY UPDATE stg_value='smtp';"
$mysql -e "INSERT INTO lime_settings_global (stg_name, stg_value) VALUES ('emailsmtpssl', 'tls') ON DUPLICATE KEY UPDATE stg_value='tls';"
$mysql -e "INSERT INTO lime_settings_global (stg_name, stg_value) VALUES ('emailsmtphost', '${MAIL_SMTP_SERVER}:${MAIL_SMTPS_PORT}') ON DUPLICATE KEY UPDATE stg_value='${MAIL_SMTP_SERVER}:${MAIL_SMTPS_PORT}';"
$mysql -e "INSERT INTO lime_settings_global (stg_name, stg_value) VALUES ('emailsmtpuser', '${MAIL_SMTP_USERNAME}') ON DUPLICATE KEY UPDATE stg_value='${MAIL_SMTP_USERNAME}';"
$mysql -e "INSERT INTO lime_settings_global (stg_name, stg_value) VALUES ('emailsmtppassword', '${MAIL_SMTP_PASSWORD}') ON DUPLICATE KEY UPDATE stg_value='${MAIL_SMTP_PASSWORD}';"
echo "==> Start apache"
APACHE_CONFDIR="" source /etc/apache2/envvars
rm -f "${APACHE_PID_FILE}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment