mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
revert logic :/
This commit is contained in:
parent
256c022481
commit
6233555105
4 changed files with 7 additions and 7 deletions
|
@ -6,10 +6,10 @@ app=$1
|
||||||
users=$2 # Tous les utilisateurs autorisés sur l'app. Séparés par des virgules.
|
users=$2 # Tous les utilisateurs autorisés sur l'app. Séparés par des virgules.
|
||||||
|
|
||||||
if [ echo "$users" | grep visitors ]; then
|
if [ echo "$users" | 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
|
#app is made public
|
||||||
ynh_replace_string "# proxy_set_header X-Remote-User" " proxy_set_header X-Remote-User" /etc/yunohost/apps/$app/conf/nginx.conf
|
ynh_replace_string " proxy_set_header X-Remote-User" "# proxy_set_header X-Remote-User" /etc/yunohost/apps/$app/conf/nginx.conf
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -6,9 +6,9 @@ app=$1
|
||||||
users=$2 # Tous les utilisateurs autorisés sur l'app. Séparés par des virgules.
|
users=$2 # Tous les utilisateurs autorisés sur l'app. Séparés par des virgules.
|
||||||
|
|
||||||
if [ ! echo "$users" | grep visitors ]; then
|
if [ ! echo "$users" | 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
|
#app is made public
|
||||||
ynh_replace_string " proxy_set_header X-Remote-User" "# proxy_set_header X-Remote-User" /etc/yunohost/apps/$app/conf/nginx.conf
|
ynh_replace_string "# proxy_set_header X-Remote-User" " proxy_set_header X-Remote-User" /etc/yunohost/apps/$app/conf/nginx.conf
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -120,7 +120,7 @@ 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
|
||||||
|
|
||||||
if [ $is_public -eq 1 ]; then
|
if [ $is_public -eq 0 ]; then
|
||||||
ynh_replace_string "# proxy_set_header X-Remote-User" " proxy_set_header X-Remote-User" ../conf/nginx.conf
|
ynh_replace_string "# proxy_set_header X-Remote-User" " proxy_set_header X-Remote-User" ../conf/nginx.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ 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
|
||||||
|
|
||||||
if [ ynh_permission_has_user --permission="main" --user=visitors ]; then
|
if [ ! ynh_permission_has_user --permission="main" --user=visitors ]; then
|
||||||
ynh_replace_string "# proxy_set_header X-Remote-User" " proxy_set_header X-Remote-User" ../conf/nginx.conf
|
ynh_replace_string "# proxy_set_header X-Remote-User" " proxy_set_header X-Remote-User" ../conf/nginx.conf
|
||||||
fi
|
fi
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
|
|
Loading…
Add table
Reference in a new issue