mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
Update on SSOwat extension
This commit is contained in:
parent
d5c43699e0
commit
a6ac2c983a
2 changed files with 12 additions and 4 deletions
|
@ -41,6 +41,7 @@ title=$YNH_APP_ARG_TITLE
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
flarum_version="v0.1.0-beta.7"
|
flarum_version="v0.1.0-beta.7"
|
||||||
|
ssowat_ext_ver="*@dev"
|
||||||
|
|
||||||
#===================================================
|
#===================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
|
@ -203,10 +204,10 @@ if [[ -n $admin && -n $title ]]; then
|
||||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||||
|
|
||||||
# Install and active the SSOwat auth extension
|
# Install and active the SSOwat auth extension
|
||||||
install_and_activate_extension $app $final_path $db_name "tituspijean/flarum-ext-auth-ssowat:0.4.x-dev" "tituspijean-auth-ssowat"
|
install_and_activate_extension $app $final_path $db_name "tituspijean/flarum-ext-auth-ssowat:$ssowat_ext_ver" "tituspijean-auth-ssowat"
|
||||||
# Configure SSOwat auth extension
|
# Configure SSOwat auth extension
|
||||||
ssowatdomain=$(</etc/yunohost/current_host)
|
ssowatdomain=$(</etc/yunohost/current_host)
|
||||||
sql_command="INSERT INTO \`settings\` (\`key\`, \`value\`) VALUES ('flarum-ext-auth-ssowat.address', '$ssowatdomain'), ('flarum-ext-auth-ssowat.onlyUse', '0');"
|
sql_command="INSERT INTO \`settings\` (\`key\`, \`value\`) VALUES ('tituspijean-auth-ssowat.domain', '$ssowatdomain'), ('tituspijean-auth-ssowat.onlyUse', '0');"
|
||||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||||
|
|
||||||
# Install, activate and set language extensions
|
# Install, activate and set language extensions
|
||||||
|
|
|
@ -43,6 +43,7 @@ db_name=$(ynh_app_setting_get $app db_name)
|
||||||
db_pwd=$(ynh_app_setting_get $app db_pwd)
|
db_pwd=$(ynh_app_setting_get $app db_pwd)
|
||||||
old_flarum_version=$(ynh_app_setting_get "$app" flarum_version)
|
old_flarum_version=$(ynh_app_setting_get "$app" flarum_version)
|
||||||
flarum_version="v0.1.0-beta.7"
|
flarum_version="v0.1.0-beta.7"
|
||||||
|
ssowat_ext_ver="*@dev"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
@ -110,13 +111,19 @@ fi
|
||||||
# FLARUM UPGRADE
|
# FLARUM UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Install Flarum
|
# Upgrade Flarum
|
||||||
exec_composer $app $final_path "require tituspijean/flarum-ext-auth-ssowat:0.4.x-dev --ansi"
|
|
||||||
exec_composer $app $final_path "update --ansi"
|
exec_composer $app $final_path "update --ansi"
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
exec_as $app php flarum cache:clear
|
exec_as $app php flarum cache:clear
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# Update SSOwat extension
|
||||||
|
install_and_activate_extension $app $final_path $db_name "tituspijean/flarum-ext-auth-ssowat:$ssowat_ext_ver" "tituspijean-auth-ssowat"
|
||||||
|
# Configure SSOwat auth extension
|
||||||
|
ssowatdomain=$(</etc/yunohost/current_host)
|
||||||
|
sql_command="INSERT INTO \`settings\` (\`key\`, \`value\`) VALUES ('tituspijean-auth-ssowat.domain', '$ssowatdomain'), ('tituspijean-auth-ssowat.onlyUse', '0');"
|
||||||
|
ynh_mysql_execute_as_root "$sql_command" $db_name
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue