Skip to content

Commit

Permalink
DEVLOG_SW
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkgo committed May 18, 2024
1 parent 75c7659 commit 6dee826
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
30 changes: 15 additions & 15 deletions src/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ub_trace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6dee826

Please sign in to comment.