From 22c46aacfc652f8b04d6b372986decc5632584fd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 29 Sep 2021 10:17:12 +0200 Subject: [PATCH] Fix --- conf/app.src | 5 ++--- manifest.json | 5 ++--- scripts/restore | 2 -- scripts/upgrade | 35 +++++------------------------------ 4 files changed, 9 insertions(+), 38 deletions(-) diff --git a/conf/app.src b/conf/app.src index 58ff251..4437b51 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,7 +1,6 @@ -SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/44c5d0feba35e4533a6ee9be178bf1e7621466b6.tar.gz -SOURCE_SUM=5743118587836e4e8376386ef54debaf2866888baeddb93cc12b47040996d836 +SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/949e2ab4d283244594414fa09d100187865c0657.tar.gz +SOURCE_SUM=06c82be7af611673b364ecca250a9c0fd6bf2516aa6fb1a948ac87c2436ad820 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= SOURCE_EXTRACT=true diff --git a/manifest.json b/manifest.json index 716cce7..2195ad3 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~ynh5", + "version": "20210916~ynh5", "url": "http://tt-rss.org", "license": "GPL-3.0-only", "maintainer": { @@ -26,8 +26,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", diff --git a/scripts/restore b/scripts/restore index 4c6bdeb..6f071e1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -36,8 +36,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " diff --git a/scripts/upgrade b/scripts/upgrade index 41c69c8..72c5e72 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,31 +94,12 @@ ynh_system_user_create --username=$app --home_dir=$final_path # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -# if [ "$upgrade_type" == "UPGRADE_APP" ] -# then -# ynh_script_progression --message="Upgrading source files..." --weight=7 - -# # Create a temporary directory -# tmpdir="$(ynh_smart_mktemp --min_size=10)" - -# # Download, check integrity, uncompress and patch the source from app.src -# ynh_setup_source --dest_dir="$tmpdir" - -# # Backup the config file in the temp dir -# cp -a "$final_path/config.php" "$tmpdir/config.php" - -# # Replace the old ttrss by the new one -# ynh_secure_remove --file="$final_path" -# mv "$tmpdir" "$final_path" -# ynh_secure_remove --file="$tmpdir" -# fi - if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php" fi chmod 750 "$final_path" @@ -153,19 +134,13 @@ then domain_path=https://$domain$path_url ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" + + ynh_script_progression --message="Upgrading ttrss database..." --weight=2 + ynh_exec_as $app php${phpversion} ${final_path}/update.php --update-schema fi + chmod 400 "$final_path/config.php" chown $app:$app "$final_path/config.php" - -#================================================= -# UPGRADE DATABASE -#================================================= - -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading ttrss database..." --weight=2 - ynh_exec_as $app php"${phpversion}" ${final_path}/update.php --update-schema -fi #================================================= # SETUP SYSTEMD