aboutsummaryrefslogtreecommitdiff
path: root/net/dnscrypt-proxy
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2017-08-08 09:09:36 +0200
committerDirk Brenken <dev@brenken.org>2017-08-08 09:14:31 +0200
commit870f9dae85b1ef48bb5c3f64280205c9363d74d2 (patch)
treead387c888321c5e7198e9e837f4ff1ee56eadd03 /net/dnscrypt-proxy
parentf5d5f5f176b66b4c441bef70ff2fdf817edf5164 (diff)
dnscrypt-proxy: mute needless warnings
* print only 'missing plugins support warning' if user really configured 'blacklist' or 'block_ipv6' parameter. Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'net/dnscrypt-proxy')
-rw-r--r--net/dnscrypt-proxy/Makefile2
-rw-r--r--net/dnscrypt-proxy/files/dnscrypt-proxy.init26
2 files changed, 15 insertions, 13 deletions
diff --git a/net/dnscrypt-proxy/Makefile b/net/dnscrypt-proxy/Makefile
index a4c69b2ad..6efd3b14b 100644
--- a/net/dnscrypt-proxy/Makefile
+++ b/net/dnscrypt-proxy/Makefile
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnscrypt-proxy
PKG_VERSION:=1.9.5
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy \
diff --git a/net/dnscrypt-proxy/files/dnscrypt-proxy.init b/net/dnscrypt-proxy/files/dnscrypt-proxy.init
index 8a2f3fd10..7d72317f7 100644
--- a/net/dnscrypt-proxy/files/dnscrypt-proxy.init
+++ b/net/dnscrypt-proxy/files/dnscrypt-proxy.init
@@ -39,6 +39,7 @@ create_config_file() {
config_get syslog_prefix $1 'syslog_prefix' 'dnscrypt-proxy'
config_get query_log_file $1 'query_log_file' ''
config_get log_level $1 'log_level' '6'
+ config_get blacklist $1 'blacklist' ''
config_get_bool syslog $1 'syslog' '1'
config_get_bool ephemeral_keys $1 'ephemeral_keys' '0'
config_get_bool local_cache $1 'local_cache' '0'
@@ -58,28 +59,29 @@ create_config_file() {
append_param "SyslogPrefix" "$syslog_prefix" $config_path
append_on_off "LocalCache" $local_cache $config_path
append_param_not_empty "QueryLogFile" "$query_log_file" $config_path
- if [ $plugins_support_enabled -ne 0 ]
+
+ if [ $plugins_support_enabled -ne 0 ] && [ $block_ipv6 -ne 0 ]
then
- append_yes_no "BlockIPv6" $block_ipv6 $config_path
- else
- log_ignored_param "block_ipv6"
+ append_yes_no "BlockIPv6" $block_ipv6 $config_path
+ elif [ $block_ipv6 -ne 0 ]
+ then
+ log_ignored_param "block_ipv6"
fi
- if [ $plugins_support_enabled -ne 0 ]
+ if [ $plugins_support_enabled -ne 0 ] && [ -n "$blacklist" ]
then
- config_list_foreach $1 'blacklist' append_blacklists $config_path
- else
- log_ignored_param "blacklist"
+ config_list_foreach $1 'blacklist' append_blacklists $config_path
+ elif [ -n "$blacklist" ]
+ then
+ log_ignored_param "blacklist"
fi
-
}
log_ignored_param() {
- local param_name=$1
- logger -t dnscrypt-proxy -p user.warn dnscrypt-proxy plugins support not present, ignoring $param_name parameter...
+ local param_name=$1
+ logger -t dnscrypt-proxy -p user.warn "dnscrypt-proxy plugins support not present, ignoring '$param_name' parameter."
}
-
append_on_off() {
local param_name=$1
local param_value=$2