diff options
author | nachoparker <nacho@ownyourbits.com> | 2020-08-28 18:52:02 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2020-11-28 00:54:34 +0300 |
commit | 92156694f683d490a6bc2426e20dd356789d913b (patch) | |
tree | 3b53f52550b4a0f5657112c474e1dcaebe547c2a /bin/ncp/NETWORKING/dnsmasq.sh | |
parent | ab9184cadd91ff3fbacf4e82aa582edccd5a7fc6 (diff) |
pre-initialize docker image
Signed-off-by: nachoparker <nacho@ownyourbits.com>
Diffstat (limited to 'bin/ncp/NETWORKING/dnsmasq.sh')
-rw-r--r-- | bin/ncp/NETWORKING/dnsmasq.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ncp/NETWORKING/dnsmasq.sh b/bin/ncp/NETWORKING/dnsmasq.sh index 4ef1234e..9f38baac 100644 --- a/bin/ncp/NETWORKING/dnsmasq.sh +++ b/bin/ncp/NETWORKING/dnsmasq.sh @@ -1,6 +1,6 @@ #!/bin/bash -# dnsmasq DNS server with cache installation on Raspbian +# dnsmasq DNS server with cache installation on Raspbian # # Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com> # GPL licensed (see end of file) * Use at your own risk! @@ -41,7 +41,7 @@ EOF configure() { - [[ $ACTIVE != "yes" ]] && { + [[ $ACTIVE != "yes" ]] && { service dnsmasq stop update-rc.d dnsmasq disable echo "dnmasq disabled" @@ -53,14 +53,14 @@ configure() [[ "$IP" == "" ]] && IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 ) [[ "$IP" == "" ]] && { echo "could not detect IP"; return 1; } - + cat > /etc/dnsmasq.conf <<EOF interface=$IFACE domain-needed # Never forward plain names (without a dot or domain part) bogus-priv # Never forward addresses in the non-routed address spaces. no-poll # Don't poll for changes in /etc/resolv.conf no-resolv # Don't use /etc/resolv.conf or any other file -cache-size=$CACHESIZE +cache-size=$CACHESIZE server=$DNSSERVER address=/$DOMAIN/$IP # This is optional if we add it to /etc/hosts EOF |