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:])
|
||||
|
Reference in New Issue
Block a user