mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
28 lines
634 B
Bash
Executable File
28 lines
634 B
Bash
Executable File
#!/bin/bash
|
|
|
|
local_salt_dir=/opt/so/saltstack/local
|
|
|
|
got_root() {
|
|
|
|
# Make sure you are root
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
echo "This script must be run using sudo!"
|
|
exit 1
|
|
fi
|
|
|
|
}
|
|
|
|
got_root
|
|
if [ ! -f $local_salt_dir/pillar/fireeye/init.sls ]; then
|
|
echo "This is nto configured for Helix Mode. Please re-install."
|
|
exit
|
|
else
|
|
echo "Enter your Helix API Key: "
|
|
read APIKEY
|
|
sed -i "s/^ api_key.*/ api_key: $APIKEY/g" $local_salt_dir/pillar/fireeye/init.sls
|
|
docker stop so-logstash
|
|
docker rm so-logstash
|
|
echo "Restarting Logstash for updated key"
|
|
salt-call state.apply logstash queue=True
|
|
fi
|