1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

add manifest.toml

This commit is contained in:
Krakinou 2023-07-29 20:48:10 +02:00
parent 6de98d8b22
commit eb16fbaede
3 changed files with 25 additions and 6 deletions

View file

@ -15,7 +15,7 @@ location __PATH__ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme; proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name __PATH__; proxy_set_header X-Script-Name __PATH__;
# proxy_set_header X-Remote-User $remote_user; proxy_set_header X-Remote-User $remote_user;
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;

View file

@ -10,10 +10,17 @@ group=$4
#Si le groupe visitors a été affecté à calibreweb #Si le groupe visitors a été affecté à calibreweb
if echo "$group" | grep visitors ; then if echo "$group" | grep visitors ; then
if tail /etc/yunohost/apps/$app/conf/nginx.conf | grep " proxy_set_header X-Remote-User"; then if tail /etc/yunohost/apps/$app/conf/nginx.conf | grep " proxy_set_header X-Remote-User"; then
#app is made public
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
path=$(ynh_app_setting_get --app=$app --key=path)
port=$(ynh_app_setting_get --app=$app --key=port)
touch ../manifest.toml
ynh_replace_string --match_string=" proxy_set_header X-Remote-User" --replace_string="# proxy_set_header X-Remote-User" --target_file="/etc/yunohost/apps/$app/conf/nginx.conf" ynh_replace_string --match_string=" proxy_set_header X-Remote-User" --replace_string="# proxy_set_header X-Remote-User" --target_file="/etc/yunohost/apps/$app/conf/nginx.conf"
ynh_add_config --template="/etc/yunohost/apps/$app/conf/nginx.conf" --destination="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_add_config --template="/etc/yunohost/apps/$app/conf/nginx.conf" --destination="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
rm ../manifest.toml
fi fi
fi fi

View file

@ -9,10 +9,22 @@ group=$4
if echo "$group" | grep visitors; then if echo "$group" | grep visitors; then
if tail /etc/yunohost/apps/$app/conf/nginx.conf | grep "# proxy_set_header X-Remote-User"; then if tail /etc/yunohost/apps/$app/conf/nginx.conf | grep "# proxy_set_header X-Remote-User"; then
#app is made public
domain = $(ynh_app_setting_get --app=$app --key=domain) domain = $(ynh_app_setting_get --app=$app --key=domain)
ynh_replace_string --match_string="# proxy_set_header X-Remote-User" --replace_string=" proxy_set_header X-Remote-User" --target_file="/etc/yunohost/apps/$app/conf/nginx.conf" path = $(ynh_app_setting_get --app=$app --key=path)
ynh_add_config --template="/etc/yunohost/apps/$app/conf/nginx.conf" --destination="/etc/nginx/conf.d/$domain.d/$app.conf" port = $(ynh_app_setting_get --app=$app --key=port)
touch ../manifest.toml
ynh_replace_string --match_string="# proxy_set_header X-Remote-User" \
--replace_string=" proxy_set_header X-Remote-User" \
--target_file="/etc/yunohost/apps/$app/conf/nginx.conf"
ynh_add_config --template="/etc/yunohost/apps/$app/conf/nginx.conf" \
--destination="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
rm ../manifest.toml
fi fi
fi fi