Skip to content

Commit

Permalink
add dev logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkgo committed May 18, 2024
1 parent 0510ef3 commit 37b891a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-test-amd64-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
push: true
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
tags: sliamb/paopaodns:dev
secrets: |
"DEVLOG=yes"
build-args:
DEVLOG_SW=yes
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +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
ENV TZ=Asia/Shanghai \
DEVLOG=$DEVLOG_SW \
UPDATE=weekly \
DNS_SERVERNAME=PaoPaoDNS,blog.03k.org \
DNSPORT=53 \
Expand Down
8 changes: 6 additions & 2 deletions src/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ fi
sleep 3
sed "s/{CORES}/$CORES/g" /data/unbound.conf | sed "s/{POWCORES}/$POWCORES/g" | sed "s/{FDLIM}/$FDLIM/g" | sed "s/{MEM1}/$MEM1/g" | sed "s/{MEM2}/$MEM2/g" | sed "s/{MEM3}/$MEM3/g" | sed "s/{ETHIP}/$ETHIP/g" | sed "s/{DNS_SERVERNAME}/$DNS_SERVERNAME/g" >/tmp/unbound.conf
if [ "$DEVLOG" = "yes" ]; then
sed -i "s/verbosity: 0/verbosity: 5/g" /tmp/unbound.conf
sed -i "s/verbosity: 0/verbosity: 2/g" /tmp/unbound.conf
fi
if [ "$safemem" = "no" ]; then
sed -i "s/#safemem//g" /tmp/unbound.conf
Expand Down Expand Up @@ -441,7 +441,11 @@ if [ "$CNAUTO" != "no" ]; then
mosdns start -d /tmp -c /tmp/mosdns.yaml &
fi
sed "s/{DNSPORT}/$DNSPORT/g" /tmp/unbound.conf | sed "s/#RAWDNS//g" >/tmp/unbound_raw.conf
unbound -c /tmp/unbound_raw.conf -p
if [ "$DEVLOG" = "yes" ]; then
unbound -c /tmp/unbound_raw.conf -p -d &
else
unbound -c /tmp/unbound_raw.conf -p
fi
#Unexpected fallback while updating data
echo "nameserver 127.0.0.1" >/etc/resolv.conf
echo "nameserver 223.5.5.5" >>/etc/resolv.conf
Expand Down

0 comments on commit 37b891a

Please sign in to comment.