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
|
||||
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
|
||||
#=================================================
|
||||
|
@ -204,7 +192,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
|||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
||||
ynh_permission_update --permission "main" --add visitors
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -97,18 +97,6 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." -
|
|||
# Create a dedicated 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
|
||||
#=================================================
|
||||
|
@ -221,8 +209,7 @@ ynh_script_progression --message="Upgrading SSOwat configuration..."
|
|||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# unprotected_uris allows SSO credentials to be passed anyway
|
||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
||||
ynh_permission_update --permission "main" --add visitors
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue