mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[wip] Change when proxy is set up so main ip is known
* Also only restart docker if the command exists (i.e. docker is installed)
This commit is contained in:
@@ -1719,9 +1719,11 @@ network_init() {
|
||||
if [[ "$setup_type" == 'iso' ]]; then
|
||||
set_management_interface
|
||||
fi
|
||||
set_main_ip >> $setup_log 2>&1
|
||||
compare_main_nic_ip
|
||||
# Check if the proxy variable was set then set proxy for various apps if so
|
||||
if [[ -n "$so_proxy" ]]; then
|
||||
set_proxy
|
||||
set_proxy >> $setup_log 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -2235,6 +2237,8 @@ set_proxy() {
|
||||
echo "export no_proxy=\"${no_proxy_string}\""
|
||||
} >> "$profile_d_config_file"
|
||||
|
||||
[[ -d '/etc/systemd/system/docker.service.d' ]] || mkdir -p '/etc/systemd/system/docker.service.d'
|
||||
|
||||
# Create proxy config for dockerd
|
||||
printf '%s\n'\
|
||||
"[Service]"\
|
||||
@@ -2243,7 +2247,7 @@ set_proxy() {
|
||||
"Environment=\"NO_PROXY=${no_proxy_string}\"" > /etc/systemd/system/docker.service.d/http-proxy.conf
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart docker
|
||||
command -v docker &> /dev/null && systemctl restart docker
|
||||
|
||||
# Set proxy for package manager
|
||||
if [ "$OS" = 'centos' ]; then
|
||||
|
||||
@@ -537,9 +537,7 @@ catch() {
|
||||
exit
|
||||
}
|
||||
|
||||
# This block sets REDIRECTIT which is used by a function outside the below subshell
|
||||
set_main_ip >> $setup_log 2>&1
|
||||
compare_main_nic_ip
|
||||
# Set REDIRECTIT variable, which is used by a function outside the below subshell
|
||||
set_redirect >> $setup_log 2>&1
|
||||
|
||||
# Begin install
|
||||
|
||||
Reference in New Issue
Block a user