mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
[wip][fix] Don't add logic to so-setup, create wrapper function in so-functions
This commit is contained in:
@@ -536,6 +536,18 @@ collect_patch_schedule_name_import() {
|
||||
}
|
||||
|
||||
collect_proxy() {
|
||||
collect_proxy_details
|
||||
while ! proxy_validate; do
|
||||
if whiptail_invalid_proxy; then
|
||||
collect_proxy_details no_ask
|
||||
else
|
||||
so_proxy=""
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
collect_proxy_details() {
|
||||
local ask=${1:-true}
|
||||
local use_proxy
|
||||
if [[ $ask != true ]]; then
|
||||
|
||||
@@ -200,11 +200,7 @@ if ! [[ -f $install_opt_file ]]; then
|
||||
"HOSTNAME=$HOSTNAME" > "$net_init_file"
|
||||
if [[ $is_manager ]]; then
|
||||
collect_proxy
|
||||
while ! proxy_validate; do
|
||||
whiptail_invalid_proxy
|
||||
collect_proxy no_ask
|
||||
done
|
||||
[[ -n "$proxy_addr" ]] && set_proxy >> $setup_log 2>&1
|
||||
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
||||
fi
|
||||
whiptail_net_setup_complete
|
||||
else
|
||||
@@ -300,14 +296,6 @@ if ! [[ -f $install_opt_file ]]; then
|
||||
|
||||
if [[ $is_manager ]]; then
|
||||
collect_proxy
|
||||
while ! proxy_validate; do
|
||||
if whiptail_invalid_proxy; then
|
||||
collect_proxy no_ask
|
||||
else
|
||||
proxy_addr=""
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ -n "$TURBO" ]]; then
|
||||
@@ -559,7 +547,7 @@ catch() {
|
||||
|
||||
# Set REDIRECTIT variable, which is used by a function outside the below subshell
|
||||
set_redirect >> $setup_log 2>&1
|
||||
[[ -n "$proxy_addr" ]] && set_proxy >> $setup_log 2>&1
|
||||
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
||||
|
||||
|
||||
# Begin install
|
||||
|
||||
Reference in New Issue
Block a user