1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adguardhome_ynh.git synced 2024-09-03 18:06:23 +02:00

Remove is_public, and add path_url

This commit is contained in:
Kay0u 2022-01-06 14:07:07 +01:00
parent a87beddb63
commit 22f9e76d7f
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
3 changed files with 9 additions and 19 deletions

View file

@ -1,7 +1,8 @@
location __PATH__/ { location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__; proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect off; proxy_redirect / __PATH__/;
proxy_cookie_path / __PATH__/;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;

View file

@ -28,14 +28,15 @@
"nginx" "nginx"
], ],
"arguments": { "arguments": {
"install": [{ "install": [
{
"name": "domain", "name": "domain",
"type": "domain" "type": "domain"
}, },
{ {
"name": "is_public", "name": "path",
"type": "boolean", "type": "path",
"default": true "default": "/adguard"
}, },
{ {
"name": "admin", "name": "admin",

View file

@ -22,8 +22,7 @@ ynh_abort_if_errors
# Retrieve arguments # Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url="/" path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD password=$YNH_APP_ARG_PASSWORD
architecture=$YNH_ARCH architecture=$YNH_ARCH
@ -194,17 +193,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]
then
ynh_permission_update --permission="main" --add="visitors"
fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================