1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00
fix linter warning
fix root install in nginx conf
This commit is contained in:
Krakinou 2022-02-06 14:20:04 +01:00
parent 9e1ade5bf8
commit 6692b15a46
4 changed files with 11 additions and 36 deletions

View file

@ -100,7 +100,7 @@ then
path_url="$new_path"
#Cannot use empty string for X-script-name, causes an issue in the python prg
if [ $path_url = "/" ] ; then
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
fi
# Create a dedicated nginx config
ynh_add_nginx_config

View file

@ -120,7 +120,7 @@ ynh_script_progression --message="Setting up system configuration..." --weight=5
if [ $path_url = "/" ] ; then
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
fi
# Create a dedicated nginx config

View file

@ -26,7 +26,6 @@ domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path)
final_path=$(ynh_app_setting_get $app final_path)
calibre_dir=$(ynh_app_setting_get $app calibre_dir)
is_public=$(ynh_app_setting_get $app is_public)
port=$(ynh_app_setting_get $app port)
#Source common.sh required to be after var initialization as some variables are updated in it that are then used in the script
@ -164,17 +163,6 @@ ynh_replace_string --match_string="<policy domain="coder" rights="none" pattern=
# Remove the option backup_core_only if it's in the settings.yml file
ynh_app_setting_delete $app backup_core_only
#=================================================
# SETUP SSOWAT
#=================================================
# Make app public if necessary
if [ $is_public -eq 1 ]
then
# unprotected_uris allows SSO credentials to be passed anyway.
ynh_permission_update --permission "main" --add visitors
fi
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -22,7 +22,6 @@ domain=$(ynh_app_setting_get $app domain)
port=$(ynh_app_setting_get $app port)
path_url=$(ynh_app_setting_get $app path)
admin=$(ynh_app_setting_get $app admin)
is_public=$(ynh_app_setting_get $app is_public)
final_path=$(ynh_app_setting_get $app final_path)
language=$(ynh_app_setting_get $app language)
@ -120,6 +119,14 @@ if sqlite3 $final_path/app.db "SELECT config_ldap_group_object_filter FROM setti
eval sqlite3 $final_path/app.db "\"UPDATE settings SET config_ldap_group_object_filter='(&(objectClass=posixGroup)(cn=%s.main))' WHERE ID=1\""
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -147,7 +154,7 @@ fi
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=5
if [ $path_url = "/" ] ; then
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
fi
# Create a dedicated nginx config
ynh_add_nginx_config
@ -232,26 +239,6 @@ chown -R $app: $final_path
yunohost service add $app --description="Browse eBook in the web" --log="/var/log/$app/$app.log"
#=================================================
# SETUP SSOWAT
#=================================================
# 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 unprotected_uris "/"
ynh_permission_update --permission "main" --add visitors
fi
#=================================================
# PACKAGE_CHECK
#=================================================
#This line of code is just used to caused an error in upgrade to be tested by package_check
if [ -e /tmp/upgrade_error ]; then
ynh_die
fi
#=================================================
# RELOAD NGINX
#=================================================