Add a simple handler for control changes.
This commit is contained in:
@@ -6,6 +6,8 @@ DNSCRYPT_PROXY_BASE_DIR="${DNSCRYPT_BASE_DIR}/dnscrypt-proxy"
|
||||
PROXY_PID_FILE="${DNSCRYPT_PROXY_BASE_DIR}/dnscrypt-proxy.pid"
|
||||
STATES_DIR="${DNSCRYPT_BASE_DIR}/states"
|
||||
|
||||
DNSCRYPT_FILE="${CONTROL_DIR}/dnscrypt"
|
||||
|
||||
INTERFACE_UNBOUND="127.0.0.53"
|
||||
INTERFACE_UNBOUND_MASK="24"
|
||||
INTERFACE_PROXY="127.0.0.54"
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
if [ -e $DNSCRYPT_FILE ]; then
|
||||
exec ./switch-to-dnscrypt.sh
|
||||
else
|
||||
exec ./switch-to-dhcp.sh
|
||||
fi
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
. common.inc
|
||||
|
||||
DNSCRYPT_FILE="${CONTROL_DIR}/dnscrypt"
|
||||
|
||||
[ -e "$DNSCRYPT_FILE" ] && exit 0
|
||||
|
||||
./set-dns-to-dhcp.sh
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
PAUSE_MAX=10
|
||||
PAUSE_INCREMENT=0.1
|
||||
DNSCRYPT_FILE="${CONTROL_DIR}/dnscrypt"
|
||||
|
||||
[ ! -e "$DNSCRYPT_FILE" ] && exit 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user