mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
add yaml config
This commit is contained in:
parent
0224575ef1
commit
3869195b1e
3 changed files with 74 additions and 5 deletions
50
conf/AdGuardHome.yaml
Normal file
50
conf/AdGuardHome.yaml
Normal file
|
@ -0,0 +1,50 @@
|
|||
bind_host: 127.0.0.1
|
||||
bind_port: 3000
|
||||
auth_name: __USER__
|
||||
auth_pass: __PWD__
|
||||
language: ""
|
||||
dns:
|
||||
port: 53
|
||||
protection_enabled: true
|
||||
filtering_enabled: true
|
||||
blocked_response_ttl: 10
|
||||
querylog_enabled: true
|
||||
ratelimit: 20
|
||||
ratelimit_whitelist: []
|
||||
refuse_any: true
|
||||
bootstrap_dns: 8.8.8.8:53
|
||||
parental_sensitivity: 0
|
||||
parental_enabled: false
|
||||
safesearch_enabled: false
|
||||
safebrowsing_enabled: false
|
||||
upstream_dns:
|
||||
- tls://1.1.1.1
|
||||
- tls://1.0.0.1
|
||||
filters:
|
||||
- enabled: true
|
||||
url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
|
||||
name: AdGuard Simplified Domain Names filter
|
||||
last_updated: 2018-12-28T10:03:32.660659837+01:00
|
||||
id: 1
|
||||
- enabled: false
|
||||
url: https://adaway.org/hosts.txt
|
||||
name: AdAway
|
||||
id: 2
|
||||
- enabled: false
|
||||
url: https://hosts-file.net/ad_servers.txt
|
||||
name: hpHosts - Ad and Tracking servers only
|
||||
id: 3
|
||||
- enabled: false
|
||||
url: http://www.malwaredomainlist.com/hostslist/hosts.txt
|
||||
name: MalwareDomainList.com Hosts List
|
||||
id: 4
|
||||
user_rules: []
|
||||
dhcp:
|
||||
enabled: false
|
||||
interface_name: ""
|
||||
gateway_ip: ""
|
||||
subnet_mask: ""
|
||||
range_start: ""
|
||||
range_end: ""
|
||||
lease_duration: 0
|
||||
schema_version: 2
|
|
@ -32,7 +32,6 @@
|
|||
},
|
||||
"example": "example.com"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
|
@ -43,7 +42,6 @@
|
|||
"example": "/adguard",
|
||||
"default": "/adguard"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
|
@ -52,6 +50,24 @@
|
|||
"fr": "Est-ce un site public ?"
|
||||
},
|
||||
"default": "true"
|
||||
},
|
||||
{
|
||||
"name": "user",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Enter your admin username ?",
|
||||
"fr": "Entrez votre nom d'utilisateur ?"
|
||||
},
|
||||
"example": "liberodark"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"type": "password",
|
||||
"ask": {
|
||||
"en": "Enter your password !",
|
||||
"fr": "Entrez votre mot de passe !"
|
||||
},
|
||||
"example": "mypassword"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ ynh_abort_if_errors
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
user=$YNH_APP_ARG_IS_USER
|
||||
password=$YNH_APP_ARG_IS_PASSWORD
|
||||
|
||||
### If it's a multi-instance app, meaning it can be installed several times independently
|
||||
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||
|
@ -100,6 +102,8 @@ ynh_setup_source "$final_path"
|
|||
#=================================================
|
||||
|
||||
ynh_replace_string "__FINALPATH__" "$final_path" "../conf/systemd.service"
|
||||
ynh_replace_string "__USER__" "$final_path" "../conf/AdGuardHome.yaml"
|
||||
ynh_replace_string "__PWD__" "$final_path" "../conf/AdGuardHome.yaml"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
@ -131,9 +135,8 @@ ynh_system_user_create $app
|
|||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
#cp -a ../conf/onlyoffice-documentserver.conf /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
|
||||
#ynh_replace_string "__NEXTCLOUDDOMAIN__" "$nextcloud_domain" "/etc/loolwsd/loolwsd.xml"
|
||||
#ynh_replace_string "__PASSWORD__" "$password" "/etc/loolwsd/loolwsd.xml"
|
||||
|
||||
cp -a ../conf/AdGuardHome.yaml $final_path/AdGuardHome.yaml
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
|
|
Loading…
Add table
Reference in a new issue