1ps aux | grep [c]elery | awk '{print $2}' | xargs kill  9
2cp testcfg.py /tmp
3sudo rm -rf /usr/local/lib/python2.6/dist-packages/couchbase*
4sudo rm -rf /usr/local/lib/python2.7/dist-packages/couchbase*
5cd /tmp
6sudo rm -rf couchbase-python*
7git clone https://github.com/couchbase/couchbase-python-client.git
8cd couchbase-python-client
9sudo python setup.py install
10cd ~/
11rm -rf testrunner
12git clone http://github.com/couchbase/testrunner.git
13cd testrunner/pysystests
14cp /tmp/testcfg.py oldtestcfg.py
15newparams=`cat testcfg.py  | egrep '^[A-Z].*=' | awk '{print $1}'`
16oldparams=`cat oldtestcfg.py  | egrep '^[A-Z].*=' | awk '{print $1}'`
17
18for param in $newparams; do
19    inold=`echo $oldparams | grep "$param"`
20    if [ -z "$inold" ]; then
21       # add new param to restored cfg
22       echo "Adding new param: ".$param
23       newparam=`cat testcfg.py | egrep "^$param.*="`
24       echo -e "\n$newparam" >> oldtestcfg.py
25    fi
26done
27
28mv oldtestcfg.py testcfg.py
29cat testcfg.py
30
31echo "Done!"
32echo "Make sure your cfg is correct!"
33echo "To start worker: celery worker -A app -l ERROR -B --purge -c 16 -I app.init"
34