diff --git a/Dockerfile b/Dockerfile index 6efa651..988bda6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,9 +43,9 @@ RUN apk add --no-cache ca-certificates dcron tzdata hiredis libevent dnscrypt-pr mv /usr/sbin/named.cache /etc/unbound/named.cache && \ adduser -D -H unbound &&\ mv /usr/sbin/repositories /etc/apk/repositories -# ARG DEVLOG_SW +ARG DEVLOG_SW ENV TZ=Asia/Shanghai \ - # DEVLOG=$DEVLOG_SW \ + DEVLOG=$DEVLOG_SW \ UPDATE=weekly \ DNS_SERVERNAME=PaoPaoDNS,blog.03k.org \ DNSPORT=53 \ diff --git a/src/debug.sh b/src/debug.sh index 219b137..205cbb0 100644 --- a/src/debug.sh +++ b/src/debug.sh @@ -140,21 +140,21 @@ if echo "$test_unbound_raw" | grep -v "refused" | grep -qEo "$IPREX4"; then echo "$test_unbound_raw" else echo unbound_raw FAILED. - blank - echo "[TEST]Run unbound trace test..." - # if [ "$DEVLOG" = "yes" ]; then - echo kill unbound and reload to debug mode... - unbound_id=$(ps | grep -v "grep" | grep "unbound_raw" | grep -Eo "[0-9]+" | head -1) - kill "$unbound_id" - sed -i "s/verbosity:.*/verbosity: 2/g" /tmp/unbound_raw.conf - unbound -c /tmp/unbound_raw.conf -p -d & - # fi - dig www.jd.com @127.0.0.1 -p5301 - dig www.taobao.com @127.0.0.1 -p5301 - unbound_id=$(ps | grep -v "grep" | grep "unbound_raw" | grep -Eo "[0-9]+" | head -1) - kill "$unbound_id" - sed -i "s/verbosity:.*/verbosity: 0/g" /tmp/unbound_raw.conf - unbound -c /tmp/unbound_raw.conf -p + if [ "$DEVLOG" = "yes" ]; then + blank + echo "[TEST]Run unbound trace test..." + echo kill unbound and reload to debug mode... + unbound_id=$(ps | grep -v "grep" | grep "unbound_raw" | grep -Eo "[0-9]+" | head -1) + kill "$unbound_id" + sed -i "s/verbosity:.*/verbosity: 2/g" /tmp/unbound_raw.conf + unbound -c /tmp/unbound_raw.conf -p -d & + dig www.jd.com @127.0.0.1 -p5301 + dig www.taobao.com @127.0.0.1 -p5301 + unbound_id=$(ps | grep -v "grep" | grep "unbound_raw" | grep -Eo "[0-9]+" | head -1) + kill "$unbound_id" + sed -i "s/verbosity:.*/verbosity: 0/g" /tmp/unbound_raw.conf + unbound -c /tmp/unbound_raw.conf -p + fi blank fi #sleep 3 diff --git a/src/ub_trace.sh b/src/ub_trace.sh index b48df4a..fe61909 100644 --- a/src/ub_trace.sh +++ b/src/ub_trace.sh @@ -6,7 +6,7 @@ echo "[TEST]Run unbound trace test..." echo kill unbound and reload to debug mode... unbound_id=$(ps | grep -v "grep" | grep "unbound_raw" | grep -Eo "[0-9]+" | head -1) kill "$unbound_id" -sed -i "s/verbosity:.*/verbosity: 5/g" /tmp/unbound_raw.conf +sed -i "s/verbosity:.*/verbosity: 4/g" /tmp/unbound_raw.conf unbound -c /tmp/unbound_raw.conf -p -d -v & dig www.jd.com @127.0.0.1 -p5301 dig www.taobao.com @127.0.0.1 -p5301