renamed to 'servicemanager'

the PYTHONPATH should be set to the directory above servicemanager
This commit is contained in:
2021-02-26 14:48:15 +01:00
parent 632beda430
commit 51abcab182
9 changed files with 158 additions and 134 deletions

View File

@ -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:])