From 45b7f7353e1bf57a05917a534241bd2cf7a82e9e Mon Sep 17 00:00:00 2001 From: Yalh Date: Fri, 25 Jan 2019 12:48:42 +0100 Subject: [PATCH] Fix multi-instance --- conf/{prod.secret.exs => prod.exs} | 0 scripts/upgrade | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 15 deletions(-) rename conf/{prod.secret.exs => prod.exs} (100%) diff --git a/conf/prod.secret.exs b/conf/prod.exs similarity index 100% rename from conf/prod.secret.exs rename to conf/prod.exs diff --git a/scripts/upgrade b/scripts/upgrade index 0f38ee2..49c8c4d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -164,41 +164,41 @@ yunohost firewall allow Both "$port" 2>&1 #================================================= # MODIFY A CONFIG FILE #================================================= -cp -f ../conf/prod.secret.exs "$final_path/$app/config/$app.secret.exs" +cp -f ../conf/prod.exs "$final_path/$app/config/$app.exs" cp -f ../conf/setup_db.psql "$final_path/$app/config/setup_db.psql" -ynh_replace_string "__DOMAIN__" "$domain" "$final_path/$app/config/$app.secret.exs" -ynh_replace_string "__KEY__" "$random_key" "$final_path/$app/config/$app.secret.exs" -ynh_replace_string "__INSTANCE_NAME__" "$name" "$final_path/$app/config/$app.secret.exs" -ynh_replace_string "__DB_NAME__" "$app" "$final_path/$app/config/$app.secret.exs" -ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/$app/config/$app.secret.exs" -ynh_replace_string "__ADMIN_EMAIL__" "$admin_email" "$final_path/$app/config/$app.secret.exs" -ynh_replace_string "__PORT__" "$port" "$final_path/$app/config/$app.secret.exs" +ynh_replace_string "__DOMAIN__" "$domain" "$final_path/$app/config/$app.exs" +ynh_replace_string "__KEY__" "$random_key" "$final_path/$app/config/$app.exs" +ynh_replace_string "__INSTANCE_NAME__" "$name" "$final_path/$app/config/$app.exs" +ynh_replace_string "__DB_NAME__" "$app" "$final_path/$app/config/$app.exs" +ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/$app/config/$app.exs" +ynh_replace_string "__ADMIN_EMAIL__" "$admin_email" "$final_path/$app/config/$app.exs" +ynh_replace_string "__PORT__" "$port" "$final_path/$app/config/$app.exs" ynh_replace_string "__DB_NAME__" "$app" "$final_path/$app/config/setup_db.psql" ynh_replace_string "__DB_PWD__" "$db_pwd" "$final_path/$app/config/setup_db.psql" if [ $cache -eq 1 ] then - ynh_replace_string "__MEDIA_CACHE__" "true" "$final_path/$app/config/$app.secret.exs" + ynh_replace_string "__MEDIA_CACHE__" "true" "$final_path/$app/config/$app.exs" else - ynh_replace_string "__MEDIA_CACHE__" "false" "$final_path/$app/config/$app.secret.exs" + ynh_replace_string "__MEDIA_CACHE__" "false" "$final_path/$app/config/$app.exs" fi # Set registrations open/closed if [ $registration -eq 1 ] then - ynh_replace_string "__REG__" "true" "$final_path/$app/config/$app.secret.exs" + ynh_replace_string "__REG__" "true" "$final_path/$app/config/$app.exs" else - ynh_replace_string "__REG__" "false" "$final_path/$app/config/$app.secret.exs" + ynh_replace_string "__REG__" "false" "$final_path/$app/config/$app.exs" fi # Recalculate and store the config file checksum into the app settings -ynh_store_file_checksum "$final_path/$app/config/$app.secret.exs" +ynh_store_file_checksum "$final_path/$app/config/$app.exs" ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. -ynh_backup_if_checksum_is_different "$final_path/$app/config/$app.secret.exs" +ynh_backup_if_checksum_is_different "$final_path/$app/config/$app.exs" # Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum "$final_path/$app/config/$app.secret.exs" +ynh_store_file_checksum "$final_path/$app/config/$app.exs" #================================================= # MAKE THE UPGRADE