mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-23 09:23:13 +01:00
Merge pull request #3100 from Security-Onion-Solutions/kilo
Add so-preflight + usage to so-monitor-add, fix managersearch missing from so-rule
This commit is contained in:
@@ -2,4 +2,22 @@
|
||||
|
||||
. /usr/sbin/so-common
|
||||
|
||||
usage() {
|
||||
read -r -d '' message <<- EOM
|
||||
usage: so-monitor-add [-h] NIC
|
||||
|
||||
positional arguments:
|
||||
NIC The interface to add to the monitor bond (ex: eth2)
|
||||
|
||||
optional arguments:
|
||||
-h, --help Show this help message and exit
|
||||
EOM
|
||||
echo "$message"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [[ $# -eq 0 || $# -gt 1 ]] || [[ $1 == '-h' || $1 == '--help' ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
add_interface_bond0 "$1"
|
||||
|
||||
@@ -58,7 +58,7 @@ def check_apply(args: dict, prompt: bool = True):
|
||||
|
||||
|
||||
def find_minion_pillar() -> str:
|
||||
regex = '^.*_(manager|standalone|import|eval)\.sls$'
|
||||
regex = '^.*_(manager|managersearch|standalone|import|eval)\.sls$'
|
||||
|
||||
result = []
|
||||
for root, _, files in os.walk(minion_pillar_dir):
|
||||
@@ -67,7 +67,7 @@ def find_minion_pillar() -> str:
|
||||
result.append(os.path.join(root, f_minion_id))
|
||||
|
||||
if len(result) == 0:
|
||||
print_err('Could not find manager-type pillar (eval, standalone, manager, import). Are you running this script on the manager?')
|
||||
print_err('Could not find manager-type pillar (eval, standalone, manager, managersearch, import). Are you running this script on the manager?')
|
||||
sys.exit(3)
|
||||
elif len(result) > 1:
|
||||
res_str = ', '.join(f'\"{result}\"')
|
||||
|
||||
Reference in New Issue
Block a user