File: launch-pdns

package info (click to toggle)
pdns 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,824 kB
  • sloc: cpp: 101,240; sh: 5,616; makefile: 2,318; sql: 860; ansic: 675; python: 635; yacc: 245; perl: 161; lex: 131
file content (18 lines) | stat: -rwxr-xr-x 388 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
LOGFILE=$(mktemp)
cleanup() {
  rm -f "$LOGFILE"
}
trap cleanup EXIT

(../../pdns/pdns_server --config-dir=. --socket-dir=. \
  --write-pid=yes \
  --local-address=127.0.0.1 --local-port=5301 \
  2>&1 | tee "$LOGFILE") &

echo "Waiting for pdns_server to start..."
while grep "Done launching threads" "$LOGFILE"; do
  sleep 2
done
# final 2 second sleep just in case.
sleep 2