improve commandline argument behaviour

+ allow hprt2 / zebra2
This commit is contained in:
2023-06-05 14:38:14 +02:00
parent fcef9cb142
commit 6130c5b5c5
5 changed files with 48 additions and 38 deletions

View File

@ -58,12 +58,12 @@ class SeaManager(ServiceManager):
sea gui <instance>
sea <instance> # the same as sea gui <instance>
sea cli <instance> # the same as old seacmd
sea start <instance> [<service>] * # the same as old 'monit start sea'
sea restart <instance> [<service>] *
sea stop <instance> [<service>] *
sea list [<instance>] *
sea start <instance> [service] * # the same as old 'monit start sea'
sea restart <instance> [service] *
sea stop <instance> [service] *
sea list [instance] *
<service> is one of sea, graph
[service] is empty or one of sea, graph
%s
* wildcards allowed, using '.' to replace 0 or more arbitrary characters in <instance>
"""
@ -132,7 +132,8 @@ class SeaManager(ServiceManager):
if match:
_, key, dev, addon, _ = match.groups()
if addon:
result.append(addon)
if addon != result[1]:
result.append(addon)
elif key == 'name':
result[0] = dev
else: