18 lines
432 B
Bash
18 lines
432 B
Bash
#!/bin/bash
|
|
|
|
## Script Location
|
|
SCRIPTDIR=$(dirname $0)
|
|
source "$SCRIPTDIR/common/colors.sh"
|
|
source "$SCRIPTDIR/common/functions.sh"
|
|
source "$SCRIPTDIR/common/load-defaults.sh"
|
|
|
|
# Prefer IPv4 for apt
|
|
if [ -d /etc/apt/apt.conf.d ]
|
|
then
|
|
if ! [ -f /etc/apt/apt.conf.d/99force-ipv4 ]
|
|
then
|
|
echo 'Acquire::ForceIPv4 "true";' >> /etc/apt/apt.conf.d/99force-ipv4
|
|
chmod 644 /etc/apt/apt.conf.d/99force-ipv4
|
|
fi
|
|
fi
|