diff --git a/README.md b/README.md index 6323eab..fbac6bb 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 @@ -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 400598d..2fddf3d 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 @@ -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 diff --git a/manifest.json b/manifest.json index 1fa38a4..9696c87 100644 --- a/manifest.json +++ b/manifest.json @@ -6,13 +6,12 @@ "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", "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", 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 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 7da5c74..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 @@ -37,8 +38,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 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 #=================================================