mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add more info to apply messaging
This commit is contained in:
@@ -38,19 +38,20 @@ def print_err(string: str):
|
|||||||
|
|
||||||
def check_apply(args: dict, prompt: bool = True):
|
def check_apply(args: dict, prompt: bool = True):
|
||||||
cmd_arr = ['salt-call', 'state.apply', 'idstools', 'queue=True']
|
cmd_arr = ['salt-call', 'state.apply', 'idstools', 'queue=True']
|
||||||
|
|
||||||
if args.apply:
|
if args.apply:
|
||||||
print('Applying idstools state...')
|
print('Configuration updated. Applying idstools state...')
|
||||||
return subprocess.run(cmd_arr)
|
return subprocess.run(cmd_arr)
|
||||||
else:
|
else:
|
||||||
if prompt:
|
if prompt:
|
||||||
message = 'Would you like to apply your changes now? (y/N) '
|
message = 'Configuration updated. Would you like to apply your changes now? (y/N) '
|
||||||
answer = input(message)
|
answer = input(message)
|
||||||
while answer.lower() not in [ 'y', 'n', '' ]:
|
while answer.lower() not in [ 'y', 'n', '' ]:
|
||||||
answer = input(message)
|
answer = input(message)
|
||||||
if answer.lower() in [ 'n', '' ]:
|
if answer.lower() in [ 'n', '' ]:
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
|
print('Applying idstools state...')
|
||||||
return subprocess.run(cmd_arr)
|
return subprocess.run(cmd_arr)
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user