From da1a1d17bfc75d9b4e7eed88af1598f232fb7941 Mon Sep 17 00:00:00 2001 From: Bryan Sullivan Date: Tue, 22 Nov 2016 17:57:02 -0800 Subject: Fix bare metal collectd agent cleanup JIRA: VES-1 Change-Id: I20eb6229e47fc00f82f84d444f7f4eecb9cd6734 Signed-off-by: Bryan Sullivan --- tests/vHello_VES.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/vHello_VES.sh b/tests/vHello_VES.sh index 00a8361..cc85ebc 100644 --- a/tests/vHello_VES.sh +++ b/tests/vHello_VES.sh @@ -310,7 +310,8 @@ stop() { p=":ubuntu" fi ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $u$p@$ip <<'EOF' -if [[ $USER == "ubuntu" ]]; then +dist=`grep DISTRIB_ID /etc/*-release | awk -F '=' '{print $2}'` +if [ "$dist" == "Ubuntu" ]; then sudo service collectd stop sudo apt-get remove -y collectd sudo rm /etc/collectd/collectd.conf @@ -319,8 +320,8 @@ else sudo yum remove -y collectd sudo rm /etc/collectd.conf fi +rm -rf $HOME/OpenStackBarcelonaDemo EOF - rm -rf $HOME/OpenStackBarcelonaDemo done } -- cgit 1.2.3-korg