diff --git a/scripts/change_url b/scripts/change_url index ad20b77..d903e72 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -113,18 +113,9 @@ fi ynh_backup_if_checksum_is_different --file="$final_path/config.json" domain=$new_domain -path_url=$new_path +path=${new_path:1} -cp ../conf/config.json.example "$final_path/config.json" - -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json" -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json" - -ynh_store_file_checksum --file="$final_path/config.json" +ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index b23f0a9..7c328f7 100644 --- a/scripts/install +++ b/scripts/install @@ -125,7 +125,6 @@ popd || ynh_die ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service" ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index 9afcd92..a70d5f3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,7 +128,6 @@ fi ynh_script_progression --message="Configuring a systemd service..." --weight=2 ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service" # Create a dedicated systemd config ynh_add_systemd_config