mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-16 05:53:09 +01:00
[fix][refactor] Move detect_ec2 and add echo statement
This commit is contained in:
@@ -583,6 +583,11 @@ configure_network_sensor() {
|
||||
fi
|
||||
}
|
||||
|
||||
detect_ec2() {
|
||||
echo "Testing if setup is running on an EC2 instance"
|
||||
if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ); then export is_ec2="true"; fi
|
||||
}
|
||||
|
||||
detect_os() {
|
||||
|
||||
# Detect Base OS
|
||||
@@ -1665,8 +1670,3 @@ es_heapsize() {
|
||||
export NODE_ES_HEAP_SIZE
|
||||
fi
|
||||
}
|
||||
|
||||
detect_ec2() {
|
||||
# Check if EC2
|
||||
if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ); then export is_ec2="true"; fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user