-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcreate_zones.sh
executable file
·51 lines (43 loc) · 1.32 KB
/
create_zones.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
PYTHONPATH=./libs
export PYTHONPATH
ldns_sign_special_path=$(which ldns-sign-special)
if [[ ! -x "${ldns_sign_special_path}" ]] ; then
echo 'File "ldns-sign-special" not found in PATH, aborting.'
exit
fi
ldns_3597_path=$(which ldns-3597)
if [[ ! -x "${ldns_3597_path}" ]] ; then
echo 'File "ldns-3597" not found in PATH, aborting.'
exit
fi
# Create output dir if it does not exist:
mkdir -p output/final
mkdir -p output/keys
mkdir -p output/signed
mkdir -p output/uncompleted
mkdir -p output/unsigned
mkdir -p output/zone_db
# Do or don't? You pick...
rm -rf output/final/*
rm -rf output/keys/*
rm -rf output/signed/*
rm -rf output/uncompleted/*
rm -rf output/unsigned/*
rm -rf output/zone_db/*
# (removing existing stuff, just to make sure everything is truly regenerated
# Skipping output/server, since it contains configs
echo "Running static zones generator" &&\
./tools/generators/static_zones.py &&\
echo "Running bad-dnssec zones and types zones generator" &&\
./tools/generators/bad_dnssec.py &&\
echo "Running delegations zones generator" &&\
./tools/generators/delegations.py &&\
echo "Running zone completer" &&\
./tools/completer/completer.py &&\
echo "Running zone signer" &&\
./tools/signer/signer.py &&\
echo "Running finalizer" &&\
./tools/finalizer/finalizer.py
echo "Prettify..."
./prettify_zones.sh