diff --git a/scripts/install b/scripts/install index 5aa5a7b..050bd6a 100644 --- a/scripts/install +++ b/scripts/install @@ -111,14 +111,13 @@ ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.json.example" ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/config.json.example" cp ../conf/config.json.example "$final_path"/config.json -ynh_store_file_checksum --file="$final_path/config.json" +ynh_store_file_checksum "$final_path/config.json" # DB Config File ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/.sequelizerc.example" ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/.sequelizerc.example" ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/.sequelizerc.example" cp ../conf/.sequelizerc.example "$final_path"/.sequelizerc -ynh_store_file_checksum --file="$final_path/.sequelizerc" #============================================== # INSTALL CODIMD diff --git a/scripts/upgrade b/scripts/upgrade index f33f32a..b45c092 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,46 +156,8 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app - - - - #================================================= # SPECIFIC UPGRADE -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -### 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 --file="$final_path/config.json" -ynh_backup_if_checksum_is_different --file="$final_path/.sequelizerc" - - -# Main config File -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.json.example" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="../conf/config.json.example" -ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="../conf/config.json.example" -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/config.json.example" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.json.example" -ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/config.json.example" -cp ../conf/config.json.example "$final_path"/config.json -ynh_store_file_checksum "$final_path/config.json" - -# DB Config File -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="../conf/.sequelizerc.example" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/.sequelizerc.example" -ynh_replace_string --match_string="__DB_PASS__" --replace_string="$db_pwd" --target_file="../conf/.sequelizerc.example" -cp ../conf/.sequelizerc.example "$final_path"/.sequelizerc - -# Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="$final_path/config.json" -ynh_store_file_checksum --file="$final_path/.sequelizerc" - - - - - #================================================= # SETUP LOGROTATE #=================================================