add getsestuff related stuff
This commit is contained in:
parent
d9877c1712
commit
ec52f6f858
7
cfg/hrpt_servicemanager.cfg
Normal file
7
cfg/hrpt_servicemanager.cfg
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
[hrpt2]
|
||||
SEA_SEA_PORT = 8642
|
||||
SEA_GRAPH_PORT = 8742
|
||||
sea_command = ./SeaServer %(serv)s_%(ins)s.tcl
|
||||
sea = 2
|
||||
|
29
cfg/servicemanager.cfg
Normal file
29
cfg/servicemanager.cfg
Normal file
@ -0,0 +1,29 @@
|
||||
[DEFAULT]
|
||||
VENV = /home/nicos/nicos/nicosenv/bin/
|
||||
FRAPPY_MAIN_PORT = 151nr
|
||||
FRAPPY_STICK_PORT = 152nr
|
||||
FRAPPY_ADDONS_PORT = 153nr
|
||||
FRAPPY_ROOT = ~/frappy
|
||||
#FRAPPY_HISTORY = ~/frappy/history/
|
||||
FRAPPY_CONFDIR = ~/frappy/cfg/<SERV>:~/frappy/cfg/develop
|
||||
FRAPPY_LOGDIR = ~/frappylog
|
||||
FRAPPY_PIDDIR = ~/frappylog/pid
|
||||
FRAPPY_SEA_DIR = ~/frappy/cfg/sea
|
||||
FRAPPY_CALIB_PATH = ~/calcurves
|
||||
frappy_command = bin/frappy-server %(ins)s_%(serv)s -p=%(port)s -c=%(cfg)s
|
||||
|
||||
SEA_SEA_PORT = 8641
|
||||
SEA_GRAPH_PORT = 8741
|
||||
SEA_ROOT = ~/sea
|
||||
sea_command = ./SeaServer %(serv)s.tcl
|
||||
|
||||
SEWEB_ROOT = ~/seweb
|
||||
SEWEB_PORT = 8941
|
||||
SEWEB_HISTORY = ~/seweb/history
|
||||
seweb_command = python3 seweb.py frappy ins=%(ins)s port=%(port)s
|
||||
|
||||
PYTHONPATH = ~
|
||||
|
||||
[MAIN]
|
||||
frappy = 1
|
||||
sea = 1
|
7
cfg/zebra_servicemanager.cfg
Normal file
7
cfg/zebra_servicemanager.cfg
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
[zebra2]
|
||||
SEA_SEA_PORT = 8642
|
||||
SEA_GRAPH_PORT = 8742
|
||||
sea_command = ./SeaServer %(serv)s_%(ins)s.tcl
|
||||
sea = 2
|
||||
|
23
getsestuff
23
getsestuff
@ -12,8 +12,8 @@ from socket import gethostname
|
||||
|
||||
instruments = ['amor', 'camea', 'dmc', 'eiger', 'focus', 'hrpt', 'morpheus', 'sans', 'tasp', 'zebra'] # boa
|
||||
|
||||
stuffsrc = realpath(join(sys.modules['__main__'].__file__, '..', '..', 'lib', 'servicemanager'))
|
||||
# this should be equivalent to /afs/psi.ch/project/sinq/common/lib/servicemanager/
|
||||
stuffsrc = '/afs/psi.ch/project/sinq/common/lib/servicemanager/'
|
||||
|
||||
doit = True # False: check only
|
||||
sim = False # True: show what to do
|
||||
action = ''
|
||||
@ -23,6 +23,21 @@ home = expanduser('~')
|
||||
hostname = gethostname().split('.')[0]
|
||||
remote = hostname not in instruments
|
||||
|
||||
if home.endswith('zolliker'):
|
||||
chdir(expanduser('~/servicemanager/'))
|
||||
cfg_fil = '/afs/psi.ch/project/sinq/common/stow/markus/lib/servicemanager/', glob('cfg/*.cfg')
|
||||
bin_dst = '/afs/psi.ch/project/sinq/common/stow/markus/bin/', ['getsestuff']
|
||||
diff = False
|
||||
for dstdir, files in cfg_fil, bin_dst:
|
||||
for src in files:
|
||||
diff = os.system(f'diff {src} {dstdir}')
|
||||
if diff and os.system(f'cp {src} {dstdir}'):
|
||||
print('can not copy', src, 'to', dstdir)
|
||||
if diff:
|
||||
print('updated getsestuff, please do again')
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if remote:
|
||||
instrument = ''
|
||||
nicosroot = ''
|
||||
@ -125,9 +140,9 @@ def check_repo(root, repo, url=None, branch=None):
|
||||
pull = False
|
||||
if (doit or sim) and not created:
|
||||
todo.add(action)
|
||||
short = reponame.rpartition('/')[2]
|
||||
short = repo.rpartition('/')[2]
|
||||
if exists(repo):
|
||||
chdir(join(root, repo))
|
||||
chdir(repo)
|
||||
gitconfig = {}
|
||||
for line in doget('git config --list'):
|
||||
key, _, value = line.partition('=')
|
||||
|
Loading…
x
Reference in New Issue
Block a user