diff --git a/conf/app.src b/conf/app.src index aed3709..58ff251 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=cb5a39a61f6319734606f06fafbb0eb60aa488cdc911ec84ee6738da533124cb +SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/44c5d0feba35e4533a6ee9be178bf1e7621466b6.tar.gz +SOURCE_SUM=5743118587836e4e8376386ef54debaf2866888baeddb93cc12b47040996d836 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index ed059df..716cce7 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 6ace68a..19fd8eb 100644 --- a/scripts/install +++ b/scripts/install @@ -63,7 +63,6 @@ db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -147,9 +146,9 @@ ynh_systemd_action --service_name=$app --action="start" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 +# ynh_script_progression --message="Configuring permissions..." --weight=1 -ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish" +# ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 6dd8108..41c69c8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,6 +71,13 @@ if [ -z "$db_name" ]; then ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + # Do not remove the file before the backup, to not fail the backup. # Remove old cron job ynh_secure_remove --file="/etc/cron.d/$app" @@ -87,23 +94,31 @@ 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=7 - - # Create a temporary directory - tmpdir="$(ynh_smart_mktemp --min_size=10)" + 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="$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" + ynh_setup_source --dest_dir="$final_path" fi chmod 750 "$final_path"