Skip to content

Commit

Permalink
Merge pull request #65 from YunoHost-Apps/testing
Browse files Browse the repository at this point in the history
Testing
  • Loading branch information
ericgaspar authored Oct 3, 2021
2 parents be360fd + 65e23db commit 0dae4f3
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 23 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions scripts/backup
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
#=================================================
Expand Down
5 changes: 3 additions & 2 deletions scripts/restore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
29 changes: 15 additions & 14 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -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
#=================================================
Expand Down Expand Up @@ -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
#=================================================
Expand Down

0 comments on commit 0dae4f3

Please sign in to comment.