From 3869195b1e7b90ec6772529056dba210c80e9895 Mon Sep 17 00:00:00 2001 From: liberodark Date: Wed, 9 Jan 2019 10:09:38 +0100 Subject: [PATCH] add yaml config --- conf/AdGuardHome.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++ manifest.json | 20 +++++++++++++++-- scripts/install | 9 +++++--- 3 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 conf/AdGuardHome.yaml diff --git a/conf/AdGuardHome.yaml b/conf/AdGuardHome.yaml new file mode 100644 index 0000000..82f95c8 --- /dev/null +++ b/conf/AdGuardHome.yaml @@ -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 \ No newline at end of file diff --git a/manifest.json b/manifest.json index 9bf57e8..b65c0b6 100644 --- a/manifest.json +++ b/manifest.json @@ -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" } ] } diff --git a/scripts/install b/scripts/install index 0418f23..3a152c0 100644 --- a/scripts/install +++ b/scripts/install @@ -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