From aa90b8009cec4b6973cbeb82ae1179ee2ed81e93 Mon Sep 17 00:00:00 2001 From: sfop Date: Thu, 30 Mar 2017 09:27:07 +0200 Subject: [PATCH] Script execution --- script/local.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script/local.py b/script/local.py index 133e41a..2e04e91 100755 --- a/script/local.py +++ b/script/local.py @@ -308,7 +308,7 @@ if get_context().isServerEnabled(): CAMTOOL_SERVER_SCRIPT = "cc" #"cam_server" def _get_camtool_port(): - return camtool.url[camtool.url.rfind(":")+1:] + return camtool.url[camtool.url.rfind(":")+1:] def is_camtool_running(): return int(exec_cmd("pgrep " + CAMTOOL_SERVER_SCRIPT + " | wc -l")) > 0 @@ -316,12 +316,11 @@ def is_camtool_running(): def kill_camtool(): ret = exec_cmd("killall -9 " + CAMTOOL_SERVER_SCRIPT) ret += exec_cmd('pkill -f " \-p ' + _get_camtool_port()) - return ret def _run_camtool(): try: cmd = "source /opt/gfa/python\n" - cmd = cmd + CAMTOOL_SERVER_SCRIPT + " -p " + _get_camtool_port() + " -b /afs/psi.ch/intranet/SF/Applications/config/camtool_n > /dev/null &" + 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