File: daemons

package info (click to toggle)
quagga 1.2.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 16,788 kB
  • sloc: ansic: 262,230; sh: 5,570; makefile: 717; perl: 329; lisp: 62; awk: 30
file content (38 lines) | stat: -rwxr-xr-x 809 bytes parent folder | download | duplicates (3)
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
#!/bin/bash
#---------------
# Testing quagga
#---------------
set -eu

DAEMONS=("bgpd" "isisd" "ospf6d" "ospfd" "pimd" "ripd" "ripngd")

# configure
for daemon in "${DAEMONS[@]}" zebra
do
    cp /usr/share/doc/quagga-core/examples/${daemon}.conf.sample \
      /etc/quagga/${daemon}.conf
done

# start (no zebra - it's brought up automaticall as a dependency)
for daemon in "${DAEMONS[@]}"
do
    systemctl start ${daemon}
done

# reload quagga by restarting zebra - dependent daemons will restart.
systemctl restart zebra

# wait for things to settle
sleep 5

# check daemons
for daemon in "${DAEMONS[@]}" zebra
do
    echo -n "check ${daemon}  -  "
    if systemctl -q is-active ${daemon}; then
        echo "${daemon} OK"
    else
        echo "ERROR: ${daemon} IS NOT RUNNING"
        exit 1
    fi
done