kill throws an error while finding pid

in quantum dhcp agent section

Change-Id: I602df7875710336125cdbb8407ff293a8e7d448e
This commit is contained in:
Surya Prabhakar 2012-10-06 19:35:56 +05:30
parent 45ae8ccc4a
commit a9c4a8aff2

View File

@ -110,5 +110,6 @@ fi
# Quantum dhcp agent runs dnsmasq
if is_service_enabled q-dhcp; then
sudo kill -9 $(ps aux | awk '/[d]nsmasq.+interface=tap/ { print $2 }')
pid=$(ps aux | awk '/[d]nsmasq.+interface=tap/ { print $2 }')
[ ! -z $pid ] && sudo kill -9 $pid
fi