renamed to 'servicemanager'
the PYTHONPATH should be set to the directory above servicemanager
This commit is contained in:
30
bin/frappy
30
bin/frappy
@ -24,31 +24,11 @@
|
||||
import sys
|
||||
from os.path import join, abspath, dirname
|
||||
|
||||
# above packages: servman, nicos, frappy, history
|
||||
# for packages: servicemanager, frappyhistory
|
||||
sys.path.insert(0, abspath(join(dirname(__file__), '../..')))
|
||||
# for frappy:
|
||||
sys.path.insert(0, abspath(join(dirname(__file__), '../../frappy')))
|
||||
|
||||
from servman import run, FrappyManager, NicosManager, SeaManager, UsageError
|
||||
from servicemanager import run
|
||||
|
||||
|
||||
NicosManager()
|
||||
serv = FrappyManager()
|
||||
SeaManager()
|
||||
|
||||
USAGE = """
|
||||
Usage:
|
||||
|
||||
frappy list [<instance>]
|
||||
frappy start <instance> <service> <cfgfiles>
|
||||
frappy restart <instance> [<service>] [<cfgfiles>]
|
||||
frappy stop <instance> [<service>]
|
||||
|
||||
<service> is one of main, stick, addons
|
||||
<instance> is one of %s
|
||||
""" % ', '.join(serv.info)
|
||||
|
||||
try:
|
||||
run(serv, sys.argv[1:])
|
||||
|
||||
except Exception as e: # TODO: change to UsageError
|
||||
print(repr(e))
|
||||
print(''.join(USAGE))
|
||||
run('frappy', sys.argv[1:])
|
||||
|
41
bin/nicos
41
bin/nicos
@ -24,42 +24,11 @@
|
||||
import sys
|
||||
from os.path import join, abspath, dirname
|
||||
|
||||
# above packages: servman, nicos, frappy, history
|
||||
# for packages: servicemanager, frappyhistory
|
||||
sys.path.insert(0, abspath(join(dirname(__file__), '../..')))
|
||||
# for nicos:
|
||||
sys.path.insert(0, abspath(join(dirname(__file__), '../../nicos')))
|
||||
|
||||
from servman import run, FrappyManager, NicosManager, SeaManager, UsageError
|
||||
from servicemanager import run
|
||||
|
||||
|
||||
serv = NicosManager()
|
||||
FrappyManager()
|
||||
SeaManager()
|
||||
|
||||
|
||||
USAGE = """
|
||||
Usage:
|
||||
|
||||
nicos gui <instance>
|
||||
nicos <instance> (the same as above)
|
||||
nicos list [<instance>]
|
||||
nicos start <instance> [<service>]
|
||||
nicos restart <instance> [<service>]
|
||||
nicos stop <instance> [<service>]
|
||||
nicos create <instance> <nr>
|
||||
nicos create all
|
||||
nicos link <instance> (create links to nicos data and scripts)
|
||||
|
||||
<service> is one of main, stick, addons
|
||||
<instance> is one of %s
|
||||
|
||||
to be done after the experiment:
|
||||
nicos copy (copy data and scripts from link)
|
||||
nicos copy [<instance> [<year>/<proposal>]] (copy specific data)
|
||||
|
||||
""" % ', '.join(serv.info)
|
||||
|
||||
try:
|
||||
run(serv, sys.argv[1:])
|
||||
|
||||
except UsageError as e:
|
||||
print(repr(e))
|
||||
print(''.join(USAGE))
|
||||
run('nicos', sys.argv[1:])
|
||||
|
32
bin/sea
32
bin/sea
@ -24,35 +24,9 @@
|
||||
import sys
|
||||
from os.path import join, abspath, dirname
|
||||
|
||||
# above packages: servman, nicos, frappy, history
|
||||
# for packages: servicemanager, frappyhistory
|
||||
sys.path.insert(0, abspath(join(dirname(__file__), '../..')))
|
||||
|
||||
from servman import run, FrappyManager, NicosManager, SeaManager, UsageError
|
||||
from servicemanager import run
|
||||
|
||||
|
||||
NicosManager()
|
||||
FrappyManager()
|
||||
serv = SeaManager()
|
||||
|
||||
USAGE = """
|
||||
Usage:
|
||||
|
||||
sea gui <instance>
|
||||
sea <instance> # the same as sea gui <instance>
|
||||
sea cli <instance> (the same as old seacmd)
|
||||
sea start <instance> <service>
|
||||
sea restart <instance> [<service>]
|
||||
sea stop <instance> [<service>]
|
||||
sea list [<instance>]
|
||||
|
||||
<service> is one of main, stick, addons
|
||||
<instance> is one of %s
|
||||
""" % ', '.join(serv.info)
|
||||
|
||||
try:
|
||||
run(serv, sys.argv[1:])
|
||||
|
||||
except Exception as e: # TODO: change to UsageError
|
||||
raise
|
||||
print(repr(e))
|
||||
print(''.join(USAGE))
|
||||
run('sea', sys.argv[1:])
|
||||
|
32
bin/seweb
Executable file
32
bin/seweb
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# *****************************************************************************
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Module authors:
|
||||
# Markus Zolliker <markus.zolliker@psi.ch>
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
import sys
|
||||
from os.path import join, abspath, dirname
|
||||
|
||||
# for packages: servicemanager, frappyhistory
|
||||
sys.path.insert(0, abspath(join(dirname(__file__), '../..')))
|
||||
|
||||
from servicemanager import run
|
||||
|
||||
run('seweb', sys.argv[1:])
|
Reference in New Issue
Block a user