From: Bryan Sullivan Date: Wed, 23 Nov 2016 01:57:02 +0000 (-0800) Subject: Fix bare metal collectd agent cleanup X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F24711%2F1;p=ves.git Fix bare metal collectd agent cleanup JIRA: VES-1 Change-Id: I20eb6229e47fc00f82f84d444f7f4eecb9cd6734 Signed-off-by: Bryan Sullivan --- 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 }