From 3cc095adc171d546f17c840e5caddd6e2fee7861 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 17 Dec 2018 22:14:19 +0100 Subject: [PATCH 1/3] Root directory not allowed in nginx.conf --- README.md | 3 +++ conf/nginx.conf | 4 ++-- scripts/install | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) 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..1aefa67 100755 --- a/scripts/install +++ b/scripts/install @@ -97,6 +97,12 @@ 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 " proxy_set_header X-Script-Name __PATH__;" + " proxy_set_header X-Script-Name /$app;" + ../conf/nginx.conf +fi # Create a dedicated nginx config ynh_add_nginx_config From fa99449d83ba96c4d6ef598dae2fc0f6a782f5a5 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 17 Dec 2018 22:21:11 +0100 Subject: [PATCH 2/3] Typo --- scripts/install | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 1aefa67..96c648d 100755 --- a/scripts/install +++ b/scripts/install @@ -99,9 +99,7 @@ pip install --target $final_path/vendor -r $final_path/requirements.txt #================================================= #Cannot use empty string for X-script-name if [ $path_url = "/" ] ; then - ynh_replace_string " proxy_set_header X-Script-Name __PATH__;" - " proxy_set_header X-Script-Name /$app;" - ../conf/nginx.conf + ynh_replace_string "X-Script-Name __PATH__;" "X-Script-Name /$app;" ../conf/nginx.conf fi # Create a dedicated nginx config From f81c3d9c408fb888760bb8fe6ac05b56c1f15579 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Mon, 17 Dec 2018 22:27:16 +0100 Subject: [PATCH 3/3] Message when removing --- scripts/remove | 7 +++++++ 1 file changed, 7 insertions(+) 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!!!"