X-Git-Url: https://git.sommitrealweird.co.uk/quagga-debian.git/blobdiff_plain/6d99eb2938e976229cb50d848a1bc491532b54f9..191fe7a34582876de01d3e62c2a6587baf59a283:/debian/tests/daemons diff --git a/debian/tests/daemons b/debian/tests/daemons new file mode 100755 index 0000000..4d02475 --- /dev/null +++ b/debian/tests/daemons @@ -0,0 +1,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