mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
remove obsoleted parts of setup/dns.sh
Now that dns_update is a part of the management daemon, we no longer are using STORAGE_ROOT/dns for anything.
This commit is contained in:
parent
e18c51293d
commit
c925f72b0b
24
setup/dns.sh
24
setup/dns.sh
@ -1,11 +1,10 @@
|
|||||||
# DNS: Configure a DNS server using nsd
|
# DNS: Configure a DNS server using nsd
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
# After running this script, you also must run setup/dns_update.sh,
|
# This script installs packages, but the DNS zone files are only
|
||||||
# and any time a zone file is added/changed/removed, and any time a
|
# created by the /dns/update API in the management server because
|
||||||
# new domain name becomes in use by a mail user.
|
# the set of zones (domains) hosted by the server depends on the
|
||||||
#
|
# mail users & aliases created by the user later.
|
||||||
# This script will turn on DNS for $PUBLIC_HOSTNAME.
|
|
||||||
|
|
||||||
source setup/functions.sh # load our functions
|
source setup/functions.sh # load our functions
|
||||||
|
|
||||||
@ -20,26 +19,13 @@ else
|
|||||||
useradd nsd;
|
useradd nsd;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Okay now install the package.
|
# Okay now install the packages.
|
||||||
|
|
||||||
apt_install nsd
|
apt_install nsd
|
||||||
|
|
||||||
# Prepare nsd's configuration.
|
# Prepare nsd's configuration.
|
||||||
|
|
||||||
sudo mkdir -p /var/run/nsd
|
sudo mkdir -p /var/run/nsd
|
||||||
mkdir -p "$STORAGE_ROOT/dns";
|
|
||||||
|
|
||||||
# Create the default zone if it doesn't exist.
|
|
||||||
|
|
||||||
if [ ! -f "$STORAGE_ROOT/dns/$PUBLIC_HOSTNAME.txt" ]; then
|
|
||||||
# can be an empty file, defaults are applied elsewhere
|
|
||||||
cat > "$STORAGE_ROOT/dns/$PUBLIC_HOSTNAME.txt" << EOF;
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Let the storage user own all DNS configuration files.
|
|
||||||
|
|
||||||
chown -R $STORAGE_USER.$STORAGE_USER $STORAGE_ROOT/dns
|
|
||||||
|
|
||||||
# Permit DNS queries on TCP/UDP in the firewall.
|
# Permit DNS queries on TCP/UDP in the firewall.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user