]>
Commit | Line | Data |
---|---|---|
3adde0d2 AG |
1 | tosql () |
2 | { | |
85277158 | 3 | if echo $ZONE2SQL | grep -q '\.\./pdns'; then |
3adde0d2 AG |
4 | ${MAKE} -C ../pdns zone2sql > /dev/null |
5 | fi | |
6 | $ZONE2SQL --transactions --$1 --named-conf=./named.conf | |
7 | } | |
8 | ||
9 | check_process () | |
10 | { | |
11 | set +e | |
12 | loopcount=0 | |
13 | while [ $loopcount -lt 5 ]; do | |
14 | sleep 1 | |
15 | pids=$(cat pdns*.pid 2>/dev/null) | |
16 | if [ ! -z "$pids" ] | |
17 | then | |
18 | kill -0 $pids >/dev/null 2>&1 | |
19 | if [ $? -eq 0 ] | |
20 | then | |
21 | set -e | |
22 | return | |
23 | fi | |
24 | fi | |
25 | let loopcount=loopcount+1 | |
26 | done | |
27 | echo "PowerDNS did not start" | |
28 | exit | |
29 | } | |
30 |