diff --git a/script/local.py b/script/local.py index 4421e9b..a2903a0 100755 --- a/script/local.py +++ b/script/local.py @@ -305,16 +305,19 @@ if get_context().isServerEnabled(): #Managing local camtool server +CAMTOOL_SERVER_SCRIPT = "camtool_pshell" #"cam_server" + def is_camtool_running(): - return int(exec_cmd("pgrep cam_server | wc -l")) > 0 + return int(exec_cmd("pgrep " + CAMTOOL_SERVER_SCRIPT + " | wc -l")) > 0 def kill_camtool(): - return exec_cmd("killall -9 cam_server") + return exec_cmd("killall -9 " + CAMTOOL_SERVER_SCRIPT) def run_camtool(): try: cmd = "source /opt/gfa/python\n" - cmd = cmd + "cam_server -p 10000 -b /afs/psi.ch/intranet/SF/Applications/config/camtool_n > /dev/null &" + port = camtool.url[camtool.url.rfind(":")+1:] + cmd = cmd + CAMTOOL_SERVER_SCRIPT + " -p " + port + " -b /afs/psi.ch/intranet/SF/Applications/config/camtool_n > /dev/null &" print exec_cmd(cmd) except: import traceback