mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
Fix nginx hacks in upgrade
This commit is contained in:
parent
c14fc9249d
commit
230356a014
2 changed files with 12 additions and 2 deletions
|
@ -201,7 +201,7 @@ 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 the SSOwat auth extension
|
# Install the SSOwat auth extension
|
||||||
exec_composer $app $final_path "require tituspijean/flarum-ext-auth-ssowat:*@dev --ansi"
|
exec_composer $app $final_path "require tituspijean/flarum-ext-auth-ssowat:0.4.x-dev --ansi"
|
||||||
|
|
||||||
# Configure SSOwat auth extension
|
# Configure SSOwat auth extension
|
||||||
ssowatdomain=$(</etc/yunohost/current_host)
|
ssowatdomain=$(</etc/yunohost/current_host)
|
||||||
|
|
|
@ -102,7 +102,7 @@ ynh_system_user_create $app
|
||||||
# COMPOSER UPGRADE
|
# COMPOSER UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if ! type "$final_path/composer" > /dev/null; then
|
if ! type "$final_path/composer.phar" > /dev/null; then
|
||||||
init_composer $app $final_path
|
init_composer $app $final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Install Flarum
|
# Install 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
|
||||||
|
@ -120,6 +121,15 @@ popd
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
|
||||||
|
if [ $path_url = "/" ]; then
|
||||||
|
sed -i "s@__LOCATION_HACK__@@g" ../conf/nginx.conf
|
||||||
|
sed -i "s@__PATH_HACK__@/@g" ../conf/nginx.conf
|
||||||
|
else
|
||||||
|
sed -i "s@__LOCATION_HACK__@$path_url@g" ../conf/nginx.conf
|
||||||
|
sed -i "s@__PATH_HACK__@$path_url$path_url@g" ../conf/nginx.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue