diff --git a/manifest.json b/manifest.json index af3b223..58e0b34 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "requirements": { "yunohost": ">= 2.7.10" }, - "version": "1.2.8-2", + "version": "1.2.8-3", "multi_instance": true, "services": [ ], diff --git a/scripts/install b/scripts/install index 52ac9ce..f6026f2 100644 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,7 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder" #================================================= # Save app settings -ynh_app_setting_set "$app" domain "$domain" +ynh_app_setting_set "$app" domain_mumble "$domain" ynh_app_setting_set "$app" server_password "$server_password" ynh_app_setting_set "$app" su_passwd "$su_passwd" ynh_app_setting_set "$app" welcometext "$welcometext" diff --git a/scripts/remove b/scripts/remove index 30e8f7c..2942dcd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get "$app" domain) +domain=$(ynh_app_setting_get "$app" domain_mumble) port=$(ynh_app_setting_get "$app" port) final_path=$(ynh_app_setting_get "$app" final_path) diff --git a/scripts/upgrade b/scripts/upgrade index ef873a2..7683fb2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get "$app" domain) +domain=$(ynh_app_setting_get "$app" domain_mumble) server_password=$(ynh_app_setting_get "$app" server_password) su_passwd=$(ynh_app_setting_get "$app" su_passwd) welcometext=$(ynh_app_setting_get "$app" welcometext) @@ -68,16 +68,25 @@ if [ -z "$server_password" ]; then systemctl disable mumble-server fi +# Fix SSO issue +# https://github.com/YunoHost-Apps/mumbleserver_ynh/issues/19 +if [ -z "$domain" ]; then + domain=$(ynh_app_setting_get "$app" domain) + ynh_app_setting_set "$app" domain_mumble "$domain" + ynh_app_setting_delete "$app" domain +fi + + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= # Backup the current version of the app -# ynh_backup_before_upgrade -# ynh_clean_setup () { +ynh_backup_before_upgrade +ynh_clean_setup () { # restore it if the upgrade fails -# ynh_restore_upgradebackup -# } + ynh_restore_upgradebackup +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors