From 2ca7d8ff9bbd5b1e88e41108cde6f24cdfa66527 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 20 Nov 2021 08:47:54 +0100 Subject: [PATCH] 4.3 --- conf/app.src | 7 +++---- conf/nginx.conf | 5 ----- manifest.json | 6 ++---- scripts/restore | 2 -- scripts/upgrade | 29 ++++++++++++++--------------- 5 files changed, 19 insertions(+), 30 deletions(-) diff --git a/conf/app.src b/conf/app.src index 6e42650..658b3db 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,5 @@ -SOURCE_URL=https://github.com/jh3y/tyto/archive/057781327fcfbfed3cf43da0993c5f4a5816a078.zip -SOURCE_SUM=cae63ac06dfe555e022fc231549eab0d7cd9d5e8a3235adeff4d5e5a793f134b +SOURCE_URL=https://github.com/jh3y/tyto/archive/refs/tags/3.0.4.tar.gz +SOURCE_SUM=12d59901d2c221bbbfbff95036c9c4023b4629cca5a63aa8750739a7b22f1ed8 SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip +SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/conf/nginx.conf b/conf/nginx.conf index 052c370..508fc0a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } diff --git a/manifest.json b/manifest.json index db45cd1..e95f231 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,6 @@ "license": "MIT", "website": "https://jh3y.github.io/tyto/", "demo": "https://jh3y.github.io/tyto/", - "userdoc": "https://yunohost.org/apps", "code": "https://github.com/jh3y/tyto" }, "license": "MIT", @@ -22,7 +21,7 @@ "url": "https://datamol.org" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -32,8 +31,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", diff --git a/scripts/restore b/scripts/restore index d8274a7..2492a06 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,8 +33,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." -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 fd4a9de..8df6f5c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,10 +23,23 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -45,20 +58,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # CREATE DEDICATED USER #=================================================