#!/bin/bash
#-----------------------
# Testing neutron-daemon
#-----------------------
set -e
DAEMONS=('neutron-server' 'neutron-l3-agent' 'neutron-dhcp-agent' 'neutron-metadata-agent' 'neutron-lbaas-agent')
for daemon in "${DAEMONS[@]}"; do
    if pidof -x $daemon > /dev/null; then
        echo "OK"
    else
        echo "ERROR: ${daemon} IS NOT RUNNING"
        exit 1
    fi
done
