renamed to 'servicemanager'
the PYTHONPATH should be set to the directory above servicemanager
This commit is contained in:
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:])
|
||||
|
Reference in New Issue
Block a user