mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-01-26 18:03:29 +01:00
Merge pull request #5469 from Security-Onion-Solutions/fix/idstools-rule-clear
Allow so-rule-update to accept any number of args
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
#!/bin/bash
|
||||
got_root() {
|
||||
|
||||
# Make sure you are root
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "This script must be run using sudo!"
|
||||
exit 1
|
||||
fi
|
||||
. /usr/sbin/so-common
|
||||
|
||||
}
|
||||
argstr=""
|
||||
for arg in "$@"; do
|
||||
argstr="${argstr} \"${arg}\""
|
||||
done
|
||||
|
||||
got_root
|
||||
docker exec so-idstools /bin/bash -c "cd /opt/so/idstools/etc && idstools-rulecat --force $1"
|
||||
docker exec so-idstools /bin/bash -c "cd /opt/so/idstools/etc && idstools-rulecat --force ${argstr}"
|
||||
|
||||
Reference in New Issue
Block a user