start frappy server automatically, if not running yet

when restarting NICOS, the frapy servers should be (re-)started
if not running already with the correct config
This commit is contained in:
2022-09-21 17:22:16 +02:00
parent 78edd77ce1
commit 16ba2bcf19
2 changed files with 27 additions and 20 deletions

View File

@@ -101,6 +101,7 @@ def frappy_start(**services):
if not secnode:
continue
cfginfo = secnode() or ''
secnode.restart(secnode.read(), False) # restart when needed only
else:
if cfginfo:
new_cfg.append((service, secnode, cfginfo))
@@ -151,7 +152,7 @@ def set_se_list():
def frappy(*args, main=None, stick=None, addons=None):
"""(re)start frappy server(s) with given configs and load setup if needed
- without argument: list running frappy servers
- without argument: list running frappy servers, restart failed frappy servers
- frappy('<cfg>'): if available, the standard stick is added too
- frappy(''): the stick is removed too
- addons are not changed when not given