mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
bugfixes
fix linter warning fix root install in nginx conf
This commit is contained in:
parent
9e1ade5bf8
commit
6692b15a46
4 changed files with 11 additions and 36 deletions
|
@ -100,7 +100,7 @@ then
|
||||||
path_url="$new_path"
|
path_url="$new_path"
|
||||||
#Cannot use empty string for X-script-name, causes an issue in the python prg
|
#Cannot use empty string for X-script-name, causes an issue in the python prg
|
||||||
if [ $path_url = "/" ] ; then
|
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
|
fi
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
|
@ -120,7 +120,7 @@ ynh_script_progression --message="Setting up system configuration..." --weight=5
|
||||||
|
|
||||||
|
|
||||||
if [ $path_url = "/" ] ; then
|
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
|
fi
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
|
|
|
@ -26,7 +26,6 @@ domain=$(ynh_app_setting_get $app domain)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get $app path)
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
calibre_dir=$(ynh_app_setting_get $app calibre_dir)
|
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)
|
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
|
#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
|
# Remove the option backup_core_only if it's in the settings.yml file
|
||||||
ynh_app_setting_delete $app backup_core_only
|
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
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -22,7 +22,6 @@ domain=$(ynh_app_setting_get $app domain)
|
||||||
port=$(ynh_app_setting_get $app port)
|
port=$(ynh_app_setting_get $app port)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get $app path)
|
||||||
admin=$(ynh_app_setting_get $app admin)
|
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)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
language=$(ynh_app_setting_get $app language)
|
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\""
|
eval sqlite3 $final_path/app.db "\"UPDATE settings SET config_ldap_group_object_filter='(&(objectClass=posixGroup)(cn=%s.main))' WHERE ID=1\""
|
||||||
fi
|
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
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -147,7 +154,7 @@ fi
|
||||||
|
|
||||||
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=5
|
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=5
|
||||||
if [ $path_url = "/" ] ; then
|
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
|
fi
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_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"
|
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
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue