diff --git a/check_process b/check_process index a127c9b..5d0a165 100644 --- a/check_process +++ b/check_process @@ -10,7 +10,6 @@ setup_private=0 setup_public=0 upgrade=1 - upgrade=1 from_commit=e27175c2dde0ebbd483b212dc76c5b27877e4ed2 backup_restore=1 multi_instance=1 change_url=1 @@ -18,6 +17,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=e27175c2dde0ebbd483b212dc76c5b27877e4ed2 - name=Merge pull request #79 from ericgaspar/update-to-upstream + ; commit= + name= manifest_arg=domain=DOMAIN&path=PATH diff --git a/conf/app.src b/conf/app.src index f753d4b..1066639 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/9d3c79498368fa99cfde684c759a1c40825aaaa9.tar.gz -SOURCE_SUM=a5f2aae2b566a0d06a7dd6d7d9d39695c09c77e3b4fc76ca2a49c041499b30d5 +SOURCE_SUM=cb5a39a61f6319734606f06fafbb0eb60aa488cdc911ec84ee6738da533124cb SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 940b075..4c03a1d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "News feed (RSS/Atom) reader and aggregator.", "fr": "Lecteur de flux d’actualité utilisant les protocoles RSS et Atom." }, - "version": "20200916~ynh3", + "version": "20200916~ynh4", "url": "http://tt-rss.org", "license": "GPL-3.0-only", "maintainer": { diff --git a/scripts/install b/scripts/install index 0ec1c34..61f9753 100644 --- a/scripts/install +++ b/scripts/install @@ -97,15 +97,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Configuring ttrss..." --weight=1 -cp ../conf/config.php "$final_path/config.php" - -# Change variables in ttrss configuration -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.php" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" -ynh_replace_string --match_string="__DOMAIN_PATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" - -# Recalculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$final_path/config.php" +domain_path=https://$domain$path_url +ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" #================================================= # SETUP SYSTEMD @@ -130,7 +123,7 @@ ynh_script_progression --message="Initializing database..." --weight=6 ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" \ < "$final_path/schema/ttrss_schema_mysql.sql" -ynh_exec_as $app php"${phpversion}" ${final_path}/update.php --update-schema +ynh_exec_as $app php${phpversion} ${final_path}/update.php --update-schema #================================================= # START TTRSS IN BACKGROUND diff --git a/scripts/upgrade b/scripts/upgrade index 9919054..c0ccfaa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,19 +126,9 @@ then ynh_secure_remove --file="$final_path" mv "$tmpdir" "$final_path" ynh_secure_remove --file="$tmpdir" - - # Verify the checksum and backup the file if it's different - ynh_backup_if_checksum_is_different --file="$final_path/config.php" - - cp ../conf/config.php "$final_path/config.php" - - # Change variables in ttrss configuration - ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.php" - ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" - ynh_replace_string --match_string="__DOMAIN_PATH__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" - - # Recalculate and store the config file checksum into the app settings - ynh_store_file_checksum --file="$final_path/config.php" + + domain_path=https://$domain$path_url + ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" #================================================= # UPGRADE DATABASE