mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
Set proxy, replace when setting up yum for manager proxy
This commit is contained in:
@@ -2410,15 +2410,13 @@ set_proxy() {
|
|||||||
"}" > /root/.docker/config.json
|
"}" > /root/.docker/config.json
|
||||||
|
|
||||||
# Set proxy for package manager
|
# Set proxy for package manager
|
||||||
if [[ $MANAGERUPDATES != 1 ]]; then
|
if [ "$OS" = 'centos' ]; then
|
||||||
if [ "$OS" = 'centos' ]; then
|
echo "proxy=$so_proxy" >> /etc/yum.conf
|
||||||
echo "proxy=$so_proxy" >> /etc/yum.conf
|
else
|
||||||
else
|
# Set it up so the updates roll through the manager
|
||||||
# Set it up so the updates roll through the manager
|
printf '%s\n'\
|
||||||
printf '%s\n'\
|
"Acquire::http::Proxy \"$so_proxy\";"\
|
||||||
"Acquire::http::Proxy \"$so_proxy\";"\
|
"Acquire::https::Proxy \"$so_proxy\";" > /etc/apt/apt.conf.d/00-proxy.conf
|
||||||
"Acquire::https::Proxy \"$so_proxy\";" > /etc/apt/apt.conf.d/00-proxy.conf
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set global git proxy
|
# Set global git proxy
|
||||||
@@ -2687,7 +2685,11 @@ set_updates() {
|
|||||||
if [ "$MANAGERUPDATES" = '1' ]; then
|
if [ "$MANAGERUPDATES" = '1' ]; then
|
||||||
if [ "$OS" = 'centos' ]; then
|
if [ "$OS" = 'centos' ]; then
|
||||||
if [[ ! $is_airgap ]] && ! ( grep -q "$MSRV" /etc/yum.conf); then
|
if [[ ! $is_airgap ]] && ! ( grep -q "$MSRV" /etc/yum.conf); then
|
||||||
echo "proxy=http://$MSRV:3142" >> /etc/yum.conf
|
if grep -q "proxy="; then
|
||||||
|
sed -i "s/proxy=.*/proxy=http:\/\/$MSRV:3142/"
|
||||||
|
else
|
||||||
|
echo "proxy=http://$MSRV:3142" >> /etc/yum.conf
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Set it up so the updates roll through the manager
|
# Set it up so the updates roll through the manager
|
||||||
|
|||||||
Reference in New Issue
Block a user