move seaweb from init to sewebman.py

This commit is contained in:
2025-04-29 11:37:31 +02:00
parent 18c693d800
commit a36df58081
2 changed files with 44 additions and 17 deletions

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# *****************************************************************************
#
# This program is free software; you can redistribute it and/or modify it under
@ -27,30 +26,21 @@ this code is currently used:
- from a script allowing to start/stop/list (and more) multiple frappy and nicos servers
"""
import sys
from servicemanager.base import ServiceManager, ServiceDown, UsageError, get_config
from servicemanager.nicosman import NicosManager
from servicemanager.seaman import SeaManager
from servicemanager.frappyman import FrappyManager, Reconnect, Keep
from servicemanager.sewebman import SewebManager
#from servicemanager.racks import RackConfig
class SewebManager(ServiceManager):
group = 'seweb'
services = ('',)
USAGE = """
Usage:
seaweb list [instance]
seaweb start <instance>
seaweb restart <instance>
seaweb stop <instance>
%s
"""
#rack = RackConfig()
all = NicosManager, FrappyManager, SeaManager, SewebManager
KINDS = 'action', 'ins', 'service'
def run(group, arglist):
try:
parser = get_config()
@ -104,5 +94,4 @@ def run(group, arglist):
except UsageError as e:
serv.do_help()
print('ERROR:', str(e))
sys.exit(1)