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__/ {
proxy_pass http://127.0.0.1:__PORT__;
proxy_redirect off;
proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect / __PATH__/;
proxy_cookie_path / __PATH__/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;

View file

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

View file

@ -22,8 +22,7 @@ ynh_abort_if_errors
# Retrieve arguments
domain=$YNH_APP_ARG_DOMAIN
path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC
path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD
architecture=$YNH_ARCH
@ -194,17 +193,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
# Start a systemd service
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
#=================================================