mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Revert all proxy changes on reinstall
This commit is contained in:
@@ -1946,6 +1946,24 @@ reinstall_init() {
|
|||||||
} >> "$setup_log" 2>&1
|
} >> "$setup_log" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset_proxy() {
|
||||||
|
[[ -f /etc/profile.d/so-proxy.sh ]] && rm -f /etc/profile.d/so-proxy.sh
|
||||||
|
|
||||||
|
[[ -f /etc/systemd/system/docker.service.d/http-proxy.conf ]] && rm -f /etc/systemd/system/docker.service.d/http-proxy.conf
|
||||||
|
systemctl daemon-reload
|
||||||
|
command -v docker &> /dev/null && systemctl restart docker
|
||||||
|
|
||||||
|
[[ -f /root/.docker/config.json ]] && rm -f /root/.docker/config.json
|
||||||
|
|
||||||
|
[[ -f /etc/gitconfig ]] && rm -f /etc/gitconfig
|
||||||
|
|
||||||
|
if [[ $OS == 'centos' ]]; then
|
||||||
|
sed -i "/proxy=/d" /etc/yum.conf
|
||||||
|
else
|
||||||
|
[[ -f /etc/apt/apt.conf.d/00-proxy.conf ]] && rm -f /etc/apt/apt.conf.d/00-proxy.conf
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
backup_dir() {
|
backup_dir() {
|
||||||
dir=$1
|
dir=$1
|
||||||
backup_suffix=$2
|
backup_suffix=$2
|
||||||
|
|||||||
@@ -205,14 +205,15 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_first_menu_iso
|
whiptail_first_menu_iso
|
||||||
if [[ $option == "CONFIGURENETWORK" ]]; then
|
if [[ $option == "CONFIGURENETWORK" ]]; then
|
||||||
collect_hostname
|
collect_hostname
|
||||||
|
reset_prpxy >> $setup_log 2>&1
|
||||||
|
collect_proxy
|
||||||
|
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
||||||
network_init_whiptail
|
network_init_whiptail
|
||||||
whiptail_management_interface_setup
|
whiptail_management_interface_setup
|
||||||
network_init
|
network_init
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
"MNIC=$MNIC" \
|
"MNIC=$MNIC" \
|
||||||
"HOSTNAME=$HOSTNAME" > "$net_init_file"
|
"HOSTNAME=$HOSTNAME" > "$net_init_file"
|
||||||
collect_proxy
|
|
||||||
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
|
||||||
whiptail_net_setup_complete
|
whiptail_net_setup_complete
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
@@ -276,9 +277,13 @@ if [[ $is_minion ]]; then
|
|||||||
collect_mngr_hostname
|
collect_mngr_hostname
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ -f $install_opt_file ]] && [[ -z $is_airgap ]]; then
|
|
||||||
collect_proxy_details
|
if ! [[ -f $install_opt_file ]]; then
|
||||||
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
reset_prpxy >> $setup_log 2>&1 # Always reset proxy when answer file doesn't exist
|
||||||
|
if [[ -z $is_airgap ]]; then
|
||||||
|
collect_proxy_details
|
||||||
|
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
percentage=0
|
percentage=0
|
||||||
|
|||||||
Reference in New Issue
Block a user