diff --git a/README.md b/README.md index 91494c4..75c37a7 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,6 @@ sudo yunohost app upgrade calibreweb -u https://github.com/Yunohost-Apps/calibre ## Todo - [ ] Multiinstance - [ ] Better Multimedia integration + +## License +Package and software are GPL 3.0 diff --git a/conf/nginx.conf b/conf/nginx.conf index 89aac79..75e244a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,8 +4,8 @@ location __PATH__ { if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://localhost:__PORT__; - proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; diff --git a/scripts/install b/scripts/install index 3931f55..96c648d 100755 --- a/scripts/install +++ b/scripts/install @@ -97,6 +97,10 @@ pip install --target $final_path/vendor -r $final_path/requirements.txt #================================================= # NGINX CONFIGURATION #================================================= +#Cannot use empty string for X-script-name +if [ $path_url = "/" ] ; then + ynh_replace_string "X-Script-Name __PATH__;" "X-Script-Name /$app;" ../conf/nginx.conf +fi # Create a dedicated nginx config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index 58b8c09..b0ade48 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,6 +17,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) port=$(ynh_app_setting_get $app port) final_path=$(ynh_app_setting_get $app final_path) +calibre_dir=$(ynh_app_setting_get $app calibre_dir) #================================================= # STANDARD REMOVE @@ -97,3 +98,9 @@ ynh_secure_remove "/var/log/$app/" # Delete a system user ynh_system_user_delete $app + +#================================================= +# MESSAGE TO USER +#================================================= + +ynh_print_warn "!!!The library folder $calibre_dir was not deleted. Delete it manually if required!!!"