mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Merge pull request #6 from YunoHost-Apps/Testing
Correction pour sous domaine
This commit is contained in:
commit
9add2d28fa
4 changed files with 16 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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!!!"
|
||||
|
|
Loading…
Add table
Reference in a new issue