1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mumbleserver_ynh.git synced 2024-09-03 19:46:03 +02:00

Fix #19 (ynh core issue when using domain without SSO)

This commit is contained in:
Jean-Baptiste Holcroft 2018-07-09 22:51:16 +02:00
parent 9827b5bb2b
commit 1e6a921153
4 changed files with 17 additions and 8 deletions

View file

@ -15,7 +15,7 @@
"requirements": {
"yunohost": ">= 2.7.10"
},
"version": "1.2.8-2",
"version": "1.2.8-3",
"multi_instance": true,
"services": [
],

View file

@ -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"

View file

@ -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)

View file

@ -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