From a56a99e2cc086a73f138ecd51c73153128221f41 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 18 Sep 2021 08:52:37 +0200 Subject: [PATCH 1/6] Fix --- manifest.json | 2 +- scripts/restore | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 1fa38a4..de606b7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Create and edit documents collaboratively", "fr": "Créez et éditer des documents collaborativement" }, - "version": "6.1.0~ynh2", + "version": "6.4.0~ynh2", "url": "https://www.onlyoffice.com", "upstream": { "license": "GPL-3.0-or-later", diff --git a/scripts/restore b/scripts/restore index 7da5c74..7a89200 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,8 +37,8 @@ nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain) #================================================= 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 " #================================================= # STANDARD RESTORATION STEPS From d5322bfa637ca27335df92374030fbefd965a559 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 18 Sep 2021 06:52:44 +0000 Subject: [PATCH 2/6] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6323eab..c10df05 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Create and edit documents collaboratively -**Shipped version:** 6.1.0~ynh2 +**Shipped version:** 6.4.0~ynh2 **Demo:** https://www.onlyoffice.com/fr/download-desktop.aspx diff --git a/README_fr.md b/README_fr.md index 400598d..d86f712 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Créez et éditer des documents collaborativement -**Version incluse :** 6.1.0~ynh2 +**Version incluse :** 6.4.0~ynh2 **Démo :** https://www.onlyoffice.com/fr/download-desktop.aspx From 1ce147ad1efdcb7e202814ecd1c32aac41f66fc4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 18 Sep 2021 15:14:51 +0200 Subject: [PATCH 3/6] Add missing final_path --- scripts/backup | 7 +++++++ scripts/restore | 1 + scripts/upgrade | 29 +++++++++++++++-------------- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/scripts/backup b/scripts/backup index be659ac..48daceb 100644 --- a/scripts/backup +++ b/scripts/backup @@ -24,6 +24,7 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME +final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) @@ -32,6 +33,12 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= ynh_print_info --message="Declaring files to be backed up..." +#================================================= +# BACKUP THE APP MAIN DIR +#================================================= + +ynh_backup --src_path="$final_path" + #================================================= # STANDARD BACKUP STEPS #================================================= diff --git a/scripts/restore b/scripts/restore index 7a89200..9d78ad9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -25,6 +25,7 @@ ynh_script_progression --message="Loading settings..." app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) path_url=$(ynh_app_setting_get --app=$app --key=path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name diff --git a/scripts/upgrade b/scripts/upgrade index c07f40c..819d017 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,12 +18,27 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) port=$(ynh_app_setting_get --app=$app --key=port) nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up OnlyOffice 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 #================================================= @@ -57,20 +72,6 @@ fi ynh_secure_remove --file="/etc/apt/sources.list.d/onlyoffice.list" ynh_secure_remove --file="/etc/apt/sources.list.d/nodesource.list" -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up OnlyOffice 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 #================================================= From 1789fe41e1d5d424a164a887cb288fcbfcbcaa04 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 18 Sep 2021 15:32:47 +0200 Subject: [PATCH 4/6] Update manifest.json --- manifest.json | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.json b/manifest.json index de606b7..9696c87 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,6 @@ "license": "GPL-3.0-or-later", "website": "https://www.onlyoffice.com", "demo": "https://www.onlyoffice.com/fr/download-desktop.aspx", - "userdoc": "https://yunohost.org/#/app_onlyoffice", "code": "https://github.com/ONLYOFFICE/DocumentServer" }, "license": "GPL-3.0-or-later", From acff2dac312a2da059c535788df8a71be18be4d5 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 18 Sep 2021 13:32:53 +0000 Subject: [PATCH 5/6] Auto-update README --- README.md | 1 - README_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index c10df05..fbac6bb 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,6 @@ Prerequisite: **OnlyOffice should be public**, see previous section. ## Documentation and resources * Official app website: https://www.onlyoffice.com -* Official user documentation: https://yunohost.org/#/app_onlyoffice * Upstream app code repository: https://github.com/ONLYOFFICE/DocumentServer * YunoHost documentation for this app: https://yunohost.org/app_onlyoffice * Report a bug: https://github.com/YunoHost-Apps/onlyoffice_ynh/issues diff --git a/README_fr.md b/README_fr.md index d86f712..2fddf3d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -75,7 +75,6 @@ Prérequis : **OnlyOffice doit être public**, voir la section précédente. ## Documentations et ressources * Site officiel de l'app : https://www.onlyoffice.com -* Documentation officielle utilisateur : https://yunohost.org/#/app_onlyoffice * Dépôt de code officiel de l'app : https://github.com/ONLYOFFICE/DocumentServer * Documentation YunoHost pour cette app : https://yunohost.org/app_onlyoffice * Signaler un bug : https://github.com/YunoHost-Apps/onlyoffice_ynh/issues From d4769986e11084b73e1fd63cd85bdb65e799bb33 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 18 Sep 2021 15:33:10 +0200 Subject: [PATCH 6/6] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d556267..58ae541 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="postgresql postgresql-contrib libstdc++6 redis-server rabbitmq-server libcurl4-dev" +pkg_dependencies="postgresql postgresql-contrib libstdc++6 rabbitmq-server libcurl4-dev" #================================================= # PERSONAL HELPERS