mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
Simplified setup script
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#!/bin/bash
|
||||
{% set MAIN_HOSTNAME = salt['grains.get']('host') %}
|
||||
{% set MAIN_IP = salt['pillar.get']('node:mainip') %}
|
||||
|
||||
#so-fleet-setup.sh $FleetEmail $FleetPassword
|
||||
#so-fleet-setup $FleetEmail $FleetPassword
|
||||
|
||||
if [[ $# -ne 2 ]] ; then
|
||||
echo "Username or Password was not set - exiting now."
|
||||
@@ -17,8 +15,7 @@ if [ ! "$(docker ps -q -f name=so-fleet)" ]; then
|
||||
salt-call state.apply redis queue=True >> /root/fleet-setup.log
|
||||
fi
|
||||
|
||||
docker exec so-fleet /bin/ash -c "echo {{ MAIN_IP }} {{ MAIN_HOSTNAME }} >> /etc/hosts"
|
||||
docker exec so-fleet fleetctl config set --address https://{{ MAIN_HOSTNAME }}:443 --tls-skip-verify --url-prefix /fleet
|
||||
docker exec so-fleet fleetctl config set --address https://localhost:8080 --tls-skip-verify --url-prefix /fleet
|
||||
docker exec so-fleet fleetctl setup --email $1 --password $2
|
||||
|
||||
docker exec so-fleet fleetctl apply -f /packs/palantir/Fleet/Endpoints/MacOS/osquery.yaml
|
||||
@@ -44,4 +41,4 @@ salt-call state.apply filebeat queue=True >> /root/fleet-setup.log
|
||||
docker stop so-nginx
|
||||
salt-call state.apply nginx queue=True >> /root/fleet-setup.log
|
||||
|
||||
echo "Fleet Setup Complete - Login here with the username and password you ran the script with: https://{{ MAIN_HOSTNAME }}"
|
||||
echo "Fleet Setup Complete - Login with the username and password you ran the script with."
|
||||
|
||||
Reference in New Issue
Block a user