OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
fix settings application and sendmail error
Markus Kahl34a8b7f24c15
diff --git a/lib/tasks/setting.rake b/lib/tasks/setting.rakeindex 15527f8e90b..7adddf8615c 100644--- a/lib/tasks/setting.rake+++ b/lib/tasks/setting.rake@@ -58,6 +58,7 @@ namespace :setting dosetting = Setting.find_by name: setting_namesetting.set_value! ENV[env_var_name].presence, force: true+ setting.save!endendenddiff --git a/packaging/scripts/postinstall b/packaging/scripts/postinstallindex 5ee9a21e40d..8dbc225e7b8 100644--- a/packaging/scripts/postinstall+++ b/packaging/scripts/postinstall@@ -4,6 +4,8 @@# the database. This will override existing settings.# The user can just choose `skip` during `reconfigure` if they do not want that.+source /etc/${APP_NAME}/conf.d/smtp+if [ "$EMAIL_DELIVERY_METHOD" = "smtp" ]; then${CLI} run rake "setting:set_to_env[\email_delivery_method=EMAIL_DELIVERY_METHOD,\@@ -15,7 +17,7 @@ smtp_password=SMTP_PASSWORD,\smtp_domain=SMTP_DOMAIN\]"elif [ "$EMAIL_DELIVERY_METHOD" = "sendmail" ]; then- ${CLI} run rake "setting:set[email_delivery_method=sendmail]"+ ${CLI} run rake "setting:set_to_env[email_delivery_method=EMAIL_DELIVERY_METHOD]"fi# We have transferred all the SMTP options to their settings within the database.