Skip to content

Commit 9a5ea5c

Browse files
author
root
committed
Typo
1 parent b1e3bb4 commit 9a5ea5c

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

setup.sh

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,50 @@
66

77
if [ ! -f /var/cache/bind/$ZONE.zone ]
88
then
9-
echo "creating zone...";
10-
cat >> /etc/bind/named.conf <<EOF
9+
echo "creating zone...";
10+
cat >> /etc/bind/named.conf <<EOF
1111
zone "$ZONE" {
12-
type master;
13-
file "$ZONE.zone.signed";
14-
allow-query { any; };
15-
allow-transfer { none; };
16-
allow-update { localhost; };
12+
type master;
13+
file "$ZONE.zone.signed";
14+
allow-query { any; };
15+
allow-transfer { none; };
16+
allow-update { localhost; };
1717
};
1818
EOF
19-
20-
echo "creating zone file..."
21-
if [ 'z "$NS" ]
22-
then
23-
IFS="," read -r -a elements <<< "$NS"
24-
for element in ${elements[@]}
25-
do
26-
SHORT+="${element%%.*}. "
27-
LONG+="$element. "
28-
done
29-
else
30-
SHORT="${NS%%.*}."
31-
LONG+="$NS."
32-
fi
33-
cat > /var/cache/bind/$ZONE.zone <<EOF
19+
20+
echo "creating zone file..."
21+
if [ 'z "$NS" ]
22+
then
23+
IFS="," read -r -a elements <<< "$NS"
24+
for element in ${elements[@]}
25+
do
26+
SHORT+="${element%%.*}. "
27+
LONG+="$element. "
28+
done
29+
else
30+
SHORT="${NS%%.*}."
31+
LONG+="$NS."
32+
fi
33+
cat > /var/cache/bind/$ZONE.zone <<EOF
3434
\$ORIGIN .
35-
\$TTL 86400 ; 1 day
36-
$ZONE IN SOA $SHORT $LONG (
37-
74 ; serial
38-
3600 ; refresh (1 hour)
39-
900 ; retry (15 minutes)
40-
604800 ; expire (1 week)
41-
86400 ; minimum (1 day)
42-
)
43-
NS $SHORT
35+
\$TTL 86400 ; 1 day
36+
$ZONE IN SOA $SHORT $LONG (
37+
74 ; serial
38+
3600 ; refresh (1 hour)
39+
900 ; retry (15 minutes)
40+
604800 ; expire (1 week)
41+
86400 ; minimum (1 day)
42+
)
43+
NS $SHORT
4444
\$ORIGIN ${ZONE}.
4545
\$TTL ${RECORD_TTL}
4646
EOF
4747
fi
4848
4949
if [ ! -f /etc/dyndns.json ]
5050
then
51-
echo "creating REST api config..."
52-
cat > /etc/dyndns.json <<EOF
51+
echo "creating REST api config..."
52+
cat > /etc/dyndns.json <<EOF
5353
{
5454
"SharedSecret": "${SHARED_SECRET}",
5555
"Server": "localhost",

0 commit comments

Comments
 (0)