mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-24 01:43:11 +01:00
Merge branch 'dev' into foxtrot
# Conflicts: # salt/common/tools/sbin/soup
This commit is contained in:
@@ -86,6 +86,19 @@ add_interface_bond0() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_airgap() {
|
||||
# See if this is an airgap install
|
||||
AIRGAP=$(cat /opt/so/saltstack/local/pillar/global.sls | grep airgap: | awk '{print $2}')
|
||||
if [[ "$AIRGAP" == "True" ]]; then
|
||||
is_airgap=0
|
||||
UPDATE_DIR=/tmp/soagupdate/SecurityOnion
|
||||
AGDOCKER=/tmp/soagupdate/docker
|
||||
AGREPO=/tmp/soagupdate/Packages
|
||||
else
|
||||
is_airgap=1
|
||||
fi
|
||||
}
|
||||
|
||||
check_container() {
|
||||
docker ps | grep "$1:" > /dev/null 2>&1
|
||||
return $?
|
||||
@@ -97,6 +110,46 @@ check_password() {
|
||||
return $?
|
||||
}
|
||||
|
||||
check_elastic_license() {
|
||||
|
||||
[ -n "$TESTING" ] && return
|
||||
|
||||
# See if the user has already accepted the license
|
||||
if [ ! -f /opt/so/state/yeselastic.txt ]; then
|
||||
elastic_license
|
||||
else
|
||||
echo "Elastic License has already been accepted"
|
||||
fi
|
||||
}
|
||||
|
||||
elastic_license() {
|
||||
|
||||
read -r -d '' message <<- EOM
|
||||
\n
|
||||
Starting in Elastic Stack version 7.11, the Elastic Stack binaries are only available under the Elastic License:
|
||||
https://securityonion.net/elastic-license
|
||||
|
||||
Please review the Elastic License:
|
||||
https://www.elastic.co/licensing/elastic-license
|
||||
|
||||
Do you agree to the terms of the Elastic License?
|
||||
|
||||
If so, type AGREE to accept the Elastic License and continue. Otherwise, press Enter to exit this program without making any changes.
|
||||
EOM
|
||||
|
||||
AGREED=$(whiptail --title "Security Onion Setup" --inputbox \
|
||||
"$message" 20 75 3>&1 1>&2 2>&3)
|
||||
|
||||
if [ "$AGREED" = 'AGREE' ]; then
|
||||
mkdir -p /opt/so/state
|
||||
touch /opt/so/state/yeselastic.txt
|
||||
else
|
||||
echo "Starting in 2.3.40 you must accept the Elastic license if you want to run Security Onion."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
fail() {
|
||||
msg=$1
|
||||
echo "ERROR: $msg"
|
||||
@@ -250,6 +303,12 @@ set_minionid() {
|
||||
MINIONID=$(lookup_grain id)
|
||||
}
|
||||
|
||||
set_palette() {
|
||||
if [ "$OS" == ubuntu ]; then
|
||||
update-alternatives --set newt-palette /etc/newt/palette.original
|
||||
fi
|
||||
}
|
||||
|
||||
set_version() {
|
||||
CURRENTVERSION=0.0.0
|
||||
if [ -f /etc/soversion ]; then
|
||||
|
||||
Reference in New Issue
Block a user