Slightly change the way plugin-related control files are handled.
A plugins.enabled file is required for plugins to be enabled. The content of that file is concatened with optional plugin-*.enabled files in order to build the list of enabled plugins. Using shell globbing for that is utterly disgusting. I couldn't agree more.
This commit is contained in:
@@ -16,7 +16,7 @@ INSECURE_OPENDNS_FILE="${CONTROL_DIR}/insecure-opendns"
|
||||
FALLBACK_FILE="${CONTROL_DIR}/fallback"
|
||||
HANDLERS_LOCK_FILE="/var/run/dnscrypt-handlers.lock"
|
||||
DOMAINS_EXCEPTIONS_FILE="${CONTROL_DIR}/domains-exceptions"
|
||||
DNSCRYPT_PROXY_PLUGINS_FILE="${CONTROL_DIR}/plugins"
|
||||
DNSCRYPT_PROXY_PLUGINS_BASE_FILE="${CONTROL_DIR}/plugin"
|
||||
STATIC_RESOLVERS_FILE="${CONTROL_DIR}/static-resolvers"
|
||||
|
||||
INTERFACE_UNBOUND="127.0.0.53"
|
||||
|
||||
@@ -23,8 +23,8 @@ PID_DIR="${PROBES_BASE_DIR}/pids" || exit 1
|
||||
mkdir -p -- "$PID_DIR" || exit 1
|
||||
|
||||
DNSCRYPT_PROXY_PLUGINS=""
|
||||
[ -r "$DNSCRYPT_PROXY_PLUGINS_FILE" ] &&
|
||||
DNSCRYPT_PROXY_PLUGINS="$(cat "$DNSCRYPT_PROXY_PLUGINS_FILE")"
|
||||
[ -r "${DNSCRYPT_PROXY_PLUGINS_BASE_FILE}s.enabled" ] &&
|
||||
DNSCRYPT_PROXY_PLUGINS="$(cat "$DNSCRYPT_PROXY_PLUGINS_BASE_FILE"[s-]*.enabled)"
|
||||
|
||||
try_resolver() {
|
||||
local priority="$1"
|
||||
|
||||
Reference in New Issue
Block a user