mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-26 22:47:49 +02:00
Move container status check to so-common
This commit is contained in:
@@ -8,18 +8,7 @@
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
got_root() {
|
||||
|
||||
# Make sure you are root
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "This script must be run using sudo!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# Make sure the user is root
|
||||
got_root
|
||||
. /usr/sbin/so-common
|
||||
|
||||
if [[ $# < 1 || $# > 2 ]]; then
|
||||
echo "Usage: $0 <list|add|update|delete|validate|valemail|valpass> [email]"
|
||||
@@ -190,9 +179,9 @@ case "${operation}" in
|
||||
validateEmail "$email"
|
||||
createUser "$email"
|
||||
echo "Successfully added new user to SOC"
|
||||
docker ps | grep so-thehive > /dev/null 2>&1 && echo $password | so-thehive-user-add "$email"
|
||||
docker ps | grep so-cortex > /dev/null 2>&1 && echo $password | so-cortex-user-add "$email"
|
||||
docker ps | grep so-fleet > /dev/null 2>&1 && echo $password | so-fleet-user-add "$email"
|
||||
check_container thehive && echo $password | so-thehive-user-add "$email"
|
||||
check_container cortex && echo $password | so-cortex-user-add "$email"
|
||||
check_container fleet && echo $password | so-fleet-user-add "$email"
|
||||
;;
|
||||
|
||||
"list")
|
||||
|
||||
Reference in New Issue
Block a user