Merge pull request #71 from linuxserver/disablecore

disable CoreDNS in client mode or if port 53 is in use
pull/79/head
driz 4 years ago committed by GitHub
commit 96e6b0f95c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,6 +26,7 @@ RUN \
jq \ jq \
libc6 \ libc6 \
libelf-dev \ libelf-dev \
net-tools \
openresolv \ openresolv \
perl \ perl \
pkg-config \ pkg-config \

@ -26,6 +26,7 @@ RUN \
jq \ jq \
libc6 \ libc6 \
libelf-dev \ libelf-dev \
net-tools \
openresolv \ openresolv \
perl \ perl \
pkg-config \ pkg-config \

@ -26,6 +26,7 @@ RUN \
jq \ jq \
libc6 \ libc6 \
libelf-dev \ libelf-dev \
net-tools \
openresolv \ openresolv \
perl \ perl \
pkg-config \ pkg-config \

@ -291,6 +291,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **06.10.20:** - Disable CoreDNS in client mode, or if port 53 is already in use in server mode.
* **04.10.20:** - Allow to specify a list of names as PEERS and add ALLOWEDIPS environment variable. Also, add peer name/id to each one of the peer sections in wg0.conf. Important: Existing users need to delete `/config/templates/peer.conf` and restart * **04.10.20:** - Allow to specify a list of names as PEERS and add ALLOWEDIPS environment variable. Also, add peer name/id to each one of the peer sections in wg0.conf. Important: Existing users need to delete `/config/templates/peer.conf` and restart
* **27.09.20:** - Cleaning service binding example to have accurate PreDown script. * **27.09.20:** - Cleaning service binding example to have accurate PreDown script.
* **06.08.20:** - Replace resolvconf with openresolv due to dns issues when a client based on this image is connected to a server also based on this image. Add IPv6 info to readme. Display kernel version in logs. * **06.08.20:** - Replace resolvconf with openresolv due to dns issues when a client based on this image is connected to a server also based on this image. Add IPv6 info to readme. Display kernel version in logs.

@ -103,6 +103,7 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: "06.10.20:", desc: "Disable CoreDNS in client mode, or if port 53 is already in use in server mode." }
- { date: "04.10.20:", desc: "Allow to specify a list of names as PEERS and add ALLOWEDIPS environment variable. Also, add peer name/id to each one of the peer sections in wg0.conf. Important: Existing users need to delete `/config/templates/peer.conf` and restart" } - { date: "04.10.20:", desc: "Allow to specify a list of names as PEERS and add ALLOWEDIPS environment variable. Also, add peer name/id to each one of the peer sections in wg0.conf. Important: Existing users need to delete `/config/templates/peer.conf` and restart" }
- { date: "27.09.20:", desc: "Cleaning service binding example to have accurate PreDown script." } - { date: "27.09.20:", desc: "Cleaning service binding example to have accurate PreDown script." }
- { date: "06.08.20:", desc: "Replace resolvconf with openresolv due to dns issues when a client based on this image is connected to a server also based on this image. Add IPv6 info to readme. Display kernel version in logs." } - { date: "06.08.20:", desc: "Replace resolvconf with openresolv due to dns issues when a client based on this image is connected to a server also based on this image. Add IPv6 info to readme. Display kernel version in logs." }

@ -231,7 +231,7 @@ if [ -n "$PEERS" ]; then
fi fi
PEERS_COUNT=$(echo "${#PEERS_ARRAY[@]}") PEERS_COUNT=$(echo "${#PEERS_ARRAY[@]}")
if [ -z "$SERVERURL" ] || [ "$SERVERURL" = "auto" ]; then if [ -z "$SERVERURL" ] || [ "$SERVERURL" = "auto" ]; then
SERVERURL=$(curl icanhazip.com) SERVERURL=$(curl -s icanhazip.com)
echo "**** SERVERURL var is either not set or is set to \"auto\", setting external IP to auto detected value of $SERVERURL ****" echo "**** SERVERURL var is either not set or is set to \"auto\", setting external IP to auto detected value of $SERVERURL ****"
else else
echo "**** External server address is set to $SERVERURL ****" echo "**** External server address is set to $SERVERURL ****"
@ -266,11 +266,13 @@ if [ -n "$PEERS" ]; then
fi fi
fi fi
else else
echo "**** Client mode selected." echo "**** Client mode selected. ****"
if [ ! -f /config/wg0.conf ]; then if [ ! -f /config/wg0.conf ]; then
echo "**** No client conf found. Provide your own client conf as \"/config/wg0.conf\" and restart the container. ****" echo "**** No client conf found. Provide your own client conf as \"/config/wg0.conf\" and restart the container. ****"
sleep infinity sleep infinity
fi fi
echo "**** Disabling CoreDNS ****"
rm -rf /etc/services.d/coredns
fi fi
# set up CoreDNS # set up CoreDNS

@ -2,5 +2,10 @@
cd /config/coredns cd /config/coredns
if netstat -apn | grep -q ":53 "; then
echo "Another service is using port 53, disabling CoreDNS"
sleep infinity
else
exec \ exec \
/app/coredns -dns.port=53 /app/coredns -dns.port=53
fi
Loading…
Cancel
Save