Make sure we have a DNS resolution when calling fix_eth1_static_ip.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
echo "apt-fast apt-fast/maxdownloads string 10" | debconf-set-selections;
|
echo "apt-fast apt-fast/maxdownloads string 10" | debconf-set-selections
|
||||||
echo "apt-fast apt-fast/dlflag boolean true" | debconf-set-selections;
|
echo "apt-fast apt-fast/dlflag boolean true" | debconf-set-selections
|
||||||
|
|
||||||
sed -i "2ideb mirror://mirrors.ubuntu.com/mirrors.txt bionic main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main restricted universe multiverse" /etc/apt/sources.list
|
sed -i "2ideb mirror://mirrors.ubuntu.com/mirrors.txt bionic main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main restricted universe multiverse" /etc/apt/sources.list
|
||||||
|
|
||||||
@@ -37,8 +37,7 @@ modify_motd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_prerequisites() {
|
test_prerequisites() {
|
||||||
for package in jq whois build-essential git docker docker-compose unzip yq
|
for package in jq whois build-essential git docker docker-compose unzip yq; do
|
||||||
do
|
|
||||||
echo "[$(date +%H:%M:%S)]: [TEST] Validating that $package is correctly installed..."
|
echo "[$(date +%H:%M:%S)]: [TEST] Validating that $package is correctly installed..."
|
||||||
# Loop through each package using dpkg
|
# Loop through each package using dpkg
|
||||||
if ! dpkg -S $package >/dev/null; then
|
if ! dpkg -S $package >/dev/null; then
|
||||||
@@ -90,6 +89,12 @@ fix_eth1_static_ip() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Make sure we do have a DNS resolution
|
||||||
|
while true; do
|
||||||
|
if [ "$(dig +short @8.8.8.8 github.com)" ]; then break; fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
install_splunk() {
|
install_splunk() {
|
||||||
@@ -294,8 +299,8 @@ import_osquery_config_into_fleet() {
|
|||||||
# Use fleetctl to import YAML files
|
# Use fleetctl to import YAML files
|
||||||
fleetctl apply -f osquery-configuration/Fleet/Endpoints/MacOS/osquery.yaml
|
fleetctl apply -f osquery-configuration/Fleet/Endpoints/MacOS/osquery.yaml
|
||||||
fleetctl apply -f osquery-configuration/Fleet/Endpoints/Windows/osquery.yaml
|
fleetctl apply -f osquery-configuration/Fleet/Endpoints/Windows/osquery.yaml
|
||||||
for pack in osquery-configuration/Fleet/Endpoints/packs/*.yaml
|
for pack in osquery-configuration/Fleet/Endpoints/packs/*.yaml; do
|
||||||
do fleetctl apply -f "$pack"
|
fleetctl apply -f "$pack"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add Splunk monitors for Fleet
|
# Add Splunk monitors for Fleet
|
||||||
@@ -426,8 +431,7 @@ install_suricata() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test_suricata_prerequisites() {
|
test_suricata_prerequisites() {
|
||||||
for package in suricata crudini
|
for package in suricata crudini; do
|
||||||
do
|
|
||||||
echo "[$(date +%H:%M:%S)]: [TEST] Validating that $package is correctly installed..."
|
echo "[$(date +%H:%M:%S)]: [TEST] Validating that $package is correctly installed..."
|
||||||
# Loop through each package using dpkg
|
# Loop through each package using dpkg
|
||||||
if ! dpkg -S $package >/dev/null; then
|
if ! dpkg -S $package >/dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user