1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Update to last standard

This commit is contained in:
maniack 2019-12-09 18:07:29 +01:00
parent feb52f60db
commit 2bd8f440ae
3 changed files with 18 additions and 2 deletions

View file

@ -19,7 +19,6 @@
upgrade=1
backup_restore=1
multi_instance=0
incorrect_path=1
port_already_use=1 (9001)
change_url=1
;; Test sans mypads

View file

@ -30,6 +30,23 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
mypads=$(ynh_app_setting_get --app=$app --key=mypads)
port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --weight=40
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# ACTIVATE MAINTENANCE MODE
#=================================================

View file

@ -28,7 +28,7 @@ export=$(ynh_app_setting_get --app=$app --key=export)
#=================================================
# Remove a service from the admin panel, added by `yunohost service add`
if yunohost service status $app >/dev/null 2>&1
if ynh_exec_fully_quiet yunohost service status $app
then
ynh_script_progression --message="Removing $app service..."
yunohost service remove $app