mirror of
https://github.com/YunoHost-Apps/aeneria_ynh.git
synced 2024-09-03 18:06:15 +02:00
Update scripts, remove unnecessary code + use new ynh_permission_update helper
This commit is contained in:
parent
0c464a031d
commit
8a1604febb
2 changed files with 2 additions and 27 deletions
|
@ -91,18 +91,6 @@ ynh_script_progression --message="Configuring nginx web server..." --weight=1
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
if [ "$path_url" = "/" ]
|
|
||||||
then
|
|
||||||
# Replace "//" location (due to nginx template)
|
|
||||||
# Prevent from replacing in "http://" expressions by excluding ":" as preceding character
|
|
||||||
sed --in-place "s@\([^:]\)//@\1/@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
|
||||||
else
|
|
||||||
# Move prefix comment #for-subdir at end of lines
|
|
||||||
sed --in-place "s/#for-subdir\(.*\)/\1 #for-subdir/g" /etc/nginx/conf.d/$domain.d/$app.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -204,7 +192,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
ynh_permission_update --permission "main" --add visitors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -97,18 +97,6 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." -
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
if [ "$path_url" = "/" ]
|
|
||||||
then
|
|
||||||
# Replace "//" location (due to nginx template)
|
|
||||||
# Prevent from replacing in "http://" expressions by excluding ":" as preceding character
|
|
||||||
sed --in-place "s@\([^:]\)//@\1/@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
|
||||||
else
|
|
||||||
# Move prefix comment #for-subdir at end of lines
|
|
||||||
sed --in-place "s/#for-subdir\(.*\)/\1 #for-subdir/g" /etc/nginx/conf.d/$domain.d/$app.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -221,8 +209,7 @@ ynh_script_progression --message="Upgrading SSOwat configuration..."
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway
|
ynh_permission_update --permission "main" --add visitors
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue