From 4e6037c0e10e24f7f46e84d89a48b16f45017ad0 Mon Sep 17 00:00:00 2001 From: Randall Randall Date: Wed, 23 Apr 2014 15:41:25 -0400 Subject: [PATCH 1/2] fix nsd package deficiency --- scripts/dns.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/dns.sh b/scripts/dns.sh index 13f9cc98..294409b2 100644 --- a/scripts/dns.sh +++ b/scripts/dns.sh @@ -9,6 +9,7 @@ # Install nsd, our DNS server software. +useradd nsd apt-get -qq -y install nsd # Prepare nsd's configuration. From c7e1e29ddff52683f72463784f379539b848514f Mon Sep 17 00:00:00 2001 From: Randall Randall Date: Wed, 23 Apr 2014 17:53:59 -0400 Subject: [PATCH 2/2] Add conditional to avoid errors if nsd exists --- scripts/dns.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/dns.sh b/scripts/dns.sh index 294409b2..14f10b2f 100644 --- a/scripts/dns.sh +++ b/scripts/dns.sh @@ -9,7 +9,14 @@ # Install nsd, our DNS server software. -useradd nsd +# ...but first, we have to create the user because the +# current Ubuntu forgets to do so in the .deb +if id nsd > /dev/null 2>&1; then + echo "nsd user exists... good"; +else + useradd nsd; +if + apt-get -qq -y install nsd # Prepare nsd's configuration.