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": { "requirements": {
"yunohost": ">= 2.7.10" "yunohost": ">= 2.7.10"
}, },
"version": "1.2.8-2", "version": "1.2.8-3",
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
], ],

View file

@ -43,7 +43,7 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
#================================================= #=================================================
# Save app settings # 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" server_password "$server_password"
ynh_app_setting_set "$app" su_passwd "$su_passwd" ynh_app_setting_set "$app" su_passwd "$su_passwd"
ynh_app_setting_set "$app" welcometext "$welcometext" ynh_app_setting_set "$app" welcometext "$welcometext"

View file

@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
app=$YNH_APP_INSTANCE_NAME 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) port=$(ynh_app_setting_get "$app" port)
final_path=$(ynh_app_setting_get "$app" final_path) 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 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) server_password=$(ynh_app_setting_get "$app" server_password)
su_passwd=$(ynh_app_setting_get "$app" su_passwd) su_passwd=$(ynh_app_setting_get "$app" su_passwd)
welcometext=$(ynh_app_setting_get "$app" welcometext) welcometext=$(ynh_app_setting_get "$app" welcometext)
@ -68,16 +68,25 @@ if [ -z "$server_password" ]; then
systemctl disable mumble-server systemctl disable mumble-server
fi 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 BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
# Backup the current version of the app # Backup the current version of the app
# ynh_backup_before_upgrade ynh_backup_before_upgrade
# ynh_clean_setup () { ynh_clean_setup () {
# restore it if the upgrade fails # restore it if the upgrade fails
# ynh_restore_upgradebackup ynh_restore_upgradebackup
# } }
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
ynh_abort_if_errors ynh_abort_if_errors