]>
Commit | Line | Data |
---|---|---|
4d916382 DS |
1 | #!/bin/bash |
2 | #--------------- | |
3 | # Testing quagga | |
4 | #--------------- | |
5 | set -e | |
6 | ||
7 | # modify config file to enable all daemons and copy config files | |
8 | CONFIG_FILE=/etc/quagga/daemons | |
41d9cc6a | 9 | DAEMONS=("zebra" "bgpd" "ospfd" "ospf6d" "ripd" "ripngd" "isisd") |
4d916382 DS |
10 | |
11 | for daemon in "${DAEMONS[@]}" | |
12 | do | |
13 | sed -i -e "s/${daemon}=no/${daemon}=yes/g" $CONFIG_FILE | |
14 | cp /usr/share/doc/quagga/examples/${daemon}.conf.sample /etc/quagga/${daemon}.conf | |
15 | done | |
16 | ||
17 | # reload quagga | |
18 | /etc/init.d/quagga restart > /dev/null 2>&1 | |
19 | ||
20 | # check daemons | |
21 | for daemon in "${DAEMONS[@]}" | |
22 | do | |
23 | echo -n "check $daemon - " | |
24 | if pidof -x $daemon > /dev/null; then | |
25 | echo "${daemon} OK" | |
26 | else | |
27 | echo "ERROR: ${daemon} IS NOT RUNNING" | |
28 | exit 1 | |
29 | fi | |
30 | done |