mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
Fleet standalone - custom hostnames
This commit is contained in:
@@ -287,6 +287,10 @@ collect_adminuser_inputs() {
|
||||
done
|
||||
}
|
||||
|
||||
collect_fleet_custom_hostname_inputs{
|
||||
whiptail_fleet_custom_hostname
|
||||
}
|
||||
|
||||
collect_fleetuser_inputs() {
|
||||
# Get a username & password for the Fleet admin user
|
||||
local valid_user=no
|
||||
|
||||
@@ -288,6 +288,7 @@ fi
|
||||
|
||||
if [ "$install_type" == 'FLEET' ]; then
|
||||
collect_fleetuser_inputs
|
||||
collect_fleet_custom_hostname_inputs
|
||||
else
|
||||
FLEETNODEUSER=$WEBUSER
|
||||
FLEETNODEPASSWD1=$WEBPASSWD1
|
||||
@@ -495,6 +496,12 @@ fi
|
||||
|
||||
set_progress_str 73 "$(print_salt_state_apply 'redis')"
|
||||
salt-call state.apply -l info redis >> $setup_log 2>&1
|
||||
|
||||
if [[ $is_fleet_standalone && $FLEETCUSTOMHOSTNAME != '' ]]; then
|
||||
set_progress_str 73 "$(print_salt_state_apply 'fleet.event_update-custom-hostname')"
|
||||
pillar_override="{"static":{"fleet_custom_hostname":"$FLEETCUSTOMHOSTNAME"}}"
|
||||
salt-call state.apply -l info fleet.event_update-custom-hostname pillar=$pillar_override >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
set_progress_str 74 "$(print_salt_state_apply 'so-fleet-setup')"
|
||||
so-fleet-setup $FLEETNODEUSER $FLEETNODEPASSWD1 >> $setup_log 2>&1
|
||||
|
||||
@@ -270,6 +270,19 @@ whiptail_create_web_user_password2() {
|
||||
|
||||
}
|
||||
|
||||
whiptail_fleet_custom_hostname() {
|
||||
|
||||
[ -n "$TESTING" ] && return
|
||||
|
||||
FLEETCUSTOMHOSTNAME=$(whiptail --title "Security Onion Install" --inputbox \
|
||||
"What FQDN should osquery clients use for connections to this Fleet node? Leave blank if the local system hostname will be used." 10 60 3>&1 1>&2 2>&3)
|
||||
|
||||
local exitstatus=$?
|
||||
whiptail_check_exitstatus $exitstatus
|
||||
}
|
||||
|
||||
|
||||
|
||||
whiptail_requirements_error() {
|
||||
|
||||
local requirement_needed=$1
|
||||
|
||||
Reference in New Issue
Block a user