diff --git a/server/tools/scripts/ci/wsproxy/boundle.sh b/server/tools/scripts/ci/dbproxy/boundle.sh similarity index 81% rename from server/tools/scripts/ci/wsproxy/boundle.sh rename to server/tools/scripts/ci/dbproxy/boundle.sh index 5206e39..5d38086 100644 --- a/server/tools/scripts/ci/wsproxy/boundle.sh +++ b/server/tools/scripts/ci/dbproxy/boundle.sh @@ -1,9 +1,9 @@ -cd third_party/wsproxy/server/wsproxy +cd third_party/dbproxy/server/dbproxy python ../tools/scripts/construct/build_pb.py cmake . make clean make -cp ../bin/wsproxy ../../../../bin/ +cp ../bin/dbproxy ../../../../bin/ cd ../../../../ diff --git a/server/tools/scripts/ci/wsproxy/manage.py b/server/tools/scripts/ci/dbproxy/manage.py similarity index 82% rename from server/tools/scripts/ci/wsproxy/manage.py rename to server/tools/scripts/ci/dbproxy/manage.py index 4dd49ca..5938fd6 100755 --- a/server/tools/scripts/ci/wsproxy/manage.py +++ b/server/tools/scripts/ci/dbproxy/manage.py @@ -29,21 +29,21 @@ def getExeCmdLine(pid): return os.popen('cat /proc/%d/cmdline' % int(pid)).read() def stop(instance_id): - wsproxy_ids = getRuningProgramPids('wsproxy') - pids = wsproxy_ids + dbproxy_ids = getRuningProgramPids('dbproxy') + pids = dbproxy_ids for pid in pids: exepath = getExePath(pid) cmdline = getExeCmdLine(pid) - if cmdline == ("./wsproxy\0-i\0%d\0" % instance_id): + if cmdline == ("./dbproxy\0-i\0%d\0" % instance_id): os.popen('kill -9 %d' % int(pid)) def listserver(): - wsproxy_ids = getRuningProgramPids('wsproxy') - pids = wsproxy_ids + dbproxy_ids = getRuningProgramPids('dbproxy') + pids = dbproxy_ids for pid in pids: exepath = getExePath(pid) cmdline = getExeCmdLine(pid) - print pid, exepath, cmdline + print(pid, exepath, cmdline) def restartServer(str_instance_ids): instance_ids = str_instance_ids.split(',') @@ -51,13 +51,13 @@ def restartServer(str_instance_ids): instance_id = int(instance_id) stop(instance_id) time.sleep(0.5) - print 'wsproxy %d starting......' % instance_id + print('dbproxy %d starting......' % instance_id) cmd = 'sh start_instance.sh %d' % (instance_id) os.popen(cmd) time.sleep(0.5) def printHelp(): - print 'usuage: [restart]' + print('usuage: [restart]') def main(argv): if len(argv) == 1: diff --git a/server/tools/scripts/ci/wsproxy/reload.sh b/server/tools/scripts/ci/dbproxy/reload.sh similarity index 100% rename from server/tools/scripts/ci/wsproxy/reload.sh rename to server/tools/scripts/ci/dbproxy/reload.sh diff --git a/server/tools/scripts/ci/wsproxy/restart.sh b/server/tools/scripts/ci/dbproxy/restart.sh similarity index 100% rename from server/tools/scripts/ci/wsproxy/restart.sh rename to server/tools/scripts/ci/dbproxy/restart.sh diff --git a/server/tools/scripts/ci/dbproxy/start_instance.sh b/server/tools/scripts/ci/dbproxy/start_instance.sh new file mode 100755 index 0000000..273657e --- /dev/null +++ b/server/tools/scripts/ci/dbproxy/start_instance.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd bin +nohup ./dbproxy -i $1 >> dbproxy$1.out 2>&1 & diff --git a/server/tools/scripts/ci/wsproxy/start_instance.sh b/server/tools/scripts/ci/wsproxy/start_instance.sh deleted file mode 100755 index 9ee9470..0000000 --- a/server/tools/scripts/ci/wsproxy/start_instance.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd bin -nohup ./wsproxy -i $1 >> wsproxy$1.out 2>&1 &