mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
Fix deconnection
This commit is contained in:
parent
bde2287850
commit
9e6e39caf8
8 changed files with 11 additions and 33 deletions
|
@ -17,13 +17,6 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-curl php
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
undo_sso_patch() {
|
||||
(
|
||||
cd $final_path
|
||||
patch -p1 -R < $YNH_CWD/../sources/patches/app-00-sso-logout.patch
|
||||
)
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -75,4 +75,4 @@ ynh_psql_dump_db --database="$db_name" > db.sql
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
ynh_print_info --message="Backup script completed for Movim. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -37,7 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1
|
||||
ynh_script_progression --message="Backing up Movim before changing its URL (may take a while)..." --time --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -131,4 +131,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Change of URL completed for $app" --time --last
|
||||
ynh_script_progression --message="Change of URL completed for Movim" --time --last
|
||||
|
|
|
@ -26,7 +26,6 @@ admin=$YNH_APP_ARG_ADMIN
|
|||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
language=$YNH_APP_ARG_LANGUAGE
|
||||
#ssoenabled=$YNH_APP_ARG_SSOENABLED
|
||||
timezone=$(cat /etc/timezone)
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
@ -222,4 +221,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
ynh_script_progression --message="Installation of Movim completed" --last
|
||||
|
|
|
@ -58,7 +58,7 @@ ynh_remove_app_dependencies
|
|||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app main directory..." --weight=6
|
||||
ynh_script_progression --message="Removing Movim main directory..." --weight=6
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
@ -66,7 +66,7 @@ ynh_secure_remove --file="$final_path"
|
|||
#=================================================
|
||||
# REMOVE APP CACHE DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing app cache directory..." --weight=6
|
||||
ynh_script_progression --message="Removing Movim cache directory..." --weight=6
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="/home/$app"
|
||||
|
@ -93,4 +93,4 @@ ynh_system_user_delete --username=$app
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Removal of $app completed" --last
|
||||
ynh_script_progression --message="Removal of Movim completed" --last
|
||||
|
|
|
@ -57,7 +57,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
ynh_script_progression --message="Restoring Movim main directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
|
@ -137,4 +137,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Restoration completed for $app" --last
|
||||
ynh_script_progression --message="Restoration completed for Movim" --last
|
||||
|
|
|
@ -20,7 +20,6 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
ssoenabled=$(ynh_app_setting_get --app=$app --key=ssoenabled)
|
||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
|
@ -63,7 +62,7 @@ fi
|
|||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
|
||||
ynh_script_progression --message="Backing up Movim before upgrading (may take a while)..." --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -192,4 +191,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Upgrade of $app completed" --last
|
||||
ynh_script_progression --message="Upgrade of Movim completed" --last
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/app/controllers/DisconnectController.php b/app/controllers/DisconnectController.php
|
||||
index abe2006..af72e68 100644
|
||||
--- a/app/controllers/DisconnectController.php
|
||||
+++ b/app/controllers/DisconnectController.php
|
||||
@@ -20,6 +20,7 @@ class DisconnectController extends Base
|
||||
// Fresh cookie
|
||||
Cookie::renew();
|
||||
|
||||
- $this->redirect('login');
|
||||
+ $main_domain = exec('cat /etc/yunohost/current_host');
|
||||
+ header('Location: https://' . $main_domain . '/yunohost/sso/?action=logout');
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue