mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
[refactor] Use 0/1 for MASTERUPDATES variable
This commit is contained in:
@@ -1430,21 +1430,20 @@ set_node_type() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_updates() {
|
set_updates() {
|
||||||
echo "MASTERUPDATES is $MASTERUPDATES"
|
if [ "$MASTERUPDATES" = 1 ]; then
|
||||||
if [ $MASTERUPDATES == 'MASTER' ]; then
|
echo "MASTERUPDATES is MASTER"
|
||||||
if [ $OS == 'centos' ]; then
|
if [ $OS = 'centos' ]; then
|
||||||
if ! grep -q $MSRV /etc/yum.conf; then
|
if ! grep -q $MSRV /etc/yum.conf; then
|
||||||
echo "proxy=http://$MSRV:3142" >> /etc/yum.conf
|
echo "proxy=http://$MSRV:3142" >> /etc/yum.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# Set it up so the updates roll through the master
|
# Set it up so the updates roll through the master
|
||||||
echo "Acquire::http::Proxy \"http://$MSRV:3142\";" > /etc/apt/apt.conf.d/00Proxy
|
echo "Acquire::http::Proxy \"http://$MSRV:3142\";" > /etc/apt/apt.conf.d/00Proxy
|
||||||
echo "Acquire::https::Proxy \"http://$MSRV:3142\";" >> /etc/apt/apt.conf.d/00Proxy
|
echo "Acquire::https::Proxy \"http://$MSRV:3142\";" >> /etc/apt/apt.conf.d/00Proxy
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "MASTERUPDATES is OPEN"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_version() {
|
set_version() {
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ if (whiptail_you_sure) ; then
|
|||||||
## Helix ##
|
## Helix ##
|
||||||
####################
|
####################
|
||||||
if [ $"INSTALLTYPE" == 'HELIXSENSOR' ]; then
|
if [ $"INSTALLTYPE" == 'HELIXSENSOR' ]; then
|
||||||
MASTERUPDATES=OPEN
|
MASTERUPDATES=0
|
||||||
filter_unused_nics
|
filter_unused_nics
|
||||||
[[ "$SKIP_BOND" != 'yes' ]] && whiptail_bond_nics
|
[[ "$SKIP_BOND" != 'yes' ]] && whiptail_bond_nics
|
||||||
whiptail_helix_apikey
|
whiptail_helix_apikey
|
||||||
|
|||||||
@@ -942,6 +942,12 @@ whiptail_master_updates() {
|
|||||||
"MASTER" "Master node is proxy for OS/Docker updates." ON \
|
"MASTER" "Master node is proxy for OS/Docker updates." ON \
|
||||||
"OPEN" "Each node connect to the Internet for updates" OFF 3>&1 1>&2 2>&3 )
|
"OPEN" "Each node connect to the Internet for updates" OFF 3>&1 1>&2 2>&3 )
|
||||||
|
|
||||||
|
if [ "$MASTERUPDATES" == "MASTER" ]; then
|
||||||
|
MASTERUPDATES=1
|
||||||
|
else
|
||||||
|
MASTERUPDATES=0
|
||||||
|
fi
|
||||||
|
|
||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user