mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
[fix] Set MSRVIP variable before hosts file is overwritten
This commit is contained in:
@@ -105,14 +105,8 @@ add_manager_hostfile() {
|
|||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add_mngr_ip_to_hosts() {
|
add_mngr_ip_to_hosts() {
|
||||||
if [[ -z "$MSRVIP" ]]; then
|
|
||||||
MSRVIP=getent hosts "$MSRV" | awk 'NR==1{print $1}'
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$MSRVIP $MSRV" >> /etc/hosts
|
echo "$MSRVIP $MSRV" >> /etc/hosts
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addtotab_generate_templates() {
|
addtotab_generate_templates() {
|
||||||
|
|||||||
@@ -791,6 +791,8 @@ whiptail_management_server() {
|
|||||||
|
|
||||||
if ! getent hosts "$MSRV"; then
|
if ! getent hosts "$MSRV"; then
|
||||||
add_manager_hostfile
|
add_manager_hostfile
|
||||||
|
else
|
||||||
|
MSRVIP=$(getent hosts "$MSRV" | awk 'NR==1{print $1}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user