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

32
bin/sea
View File

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