Closedown

This commit is contained in:
sfop
2017-03-30 08:57:24 +02:00
parent 00efff65c6
commit b61e80e5a0
+6 -3
View File
@@ -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