diff options
author | MatthewLi <matthew.lijun@huawei.com> | 2016-03-25 03:55:53 -0400 |
---|---|---|
committer | MatthewLi <matthew.lijun@huawei.com> | 2016-03-25 03:55:53 -0400 |
commit | f84c8dcc22f1499128893e62b0e15b4b592c47ba (patch) | |
tree | ee14029aa59c076fdfde1c504a385f3389477a6a /testsuites/vstf/vstf_scripts/install.sh | |
parent | 7ba76747d55669e2bbaf70a3061e1c0b5dea912e (diff) |
adjust project directories
JIRA: BOTTLENECK-56
Change-Id: Ic9acad5eaa4917093bdb85a80960f796f5b4ba7f
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'testsuites/vstf/vstf_scripts/install.sh')
-rw-r--r-- | testsuites/vstf/vstf_scripts/install.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testsuites/vstf/vstf_scripts/install.sh b/testsuites/vstf/vstf_scripts/install.sh new file mode 100644 index 00000000..4a63a1e1 --- /dev/null +++ b/testsuites/vstf/vstf_scripts/install.sh @@ -0,0 +1,51 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +SERVER=$2 +PORT=$3 +if [ -e $SERVER ] +then + SERVER="" + echo "Use Default server." +fi + +if [ -e $PORT ] +then + PORT="" + echo "Use Default port." +fi + + +killall vnstat +killall netserver +killall netperf +killall sar +rm -rf vstf.egg-info || exit 1 +rm -rf build/ || exit 1 +rm -rf /usr/local/lib/python2.7/dist-packages/vstf* || exit 1 +python setup.py install --force +if [ $1 == "manager" ]; then + vstf-agent stop + vstf-manager stop + if [ "${SERVER}x" == "x" ] + then + vstf-manager start + else + if [ "${PORT}x" == "x" ]; then + vstf-manager start --monitor ${SERVER} + else + vstf-manager start --monitor ${SERVER} --port ${PORT} + fi + fi +elif [ $1 == "agent" ];then + vstf-manager stop + vstf-agent stop + vstf-agent start --config_file=/etc/vstf/amqp/amqp.ini +fi |