mirror of https://github.com/tteck/Proxmox.git
Compare commits
4 Commits
302368a912
...
453604d1b6
Author | SHA1 | Date |
---|---|---|
|
453604d1b6 | |
|
749639b1f0 | |
|
3093af9b4f | |
|
ffd2fc3b86 |
|
@ -24,7 +24,7 @@ var_disk="2"
|
|||
var_cpu="1"
|
||||
var_ram="1024"
|
||||
var_os="alpine"
|
||||
var_version="3.18"
|
||||
var_version="3.19"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -24,7 +24,7 @@ var_disk="0.5"
|
|||
var_cpu="1"
|
||||
var_ram="256"
|
||||
var_os="alpine"
|
||||
var_version="3.18"
|
||||
var_version="3.19"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -23,7 +23,7 @@ var_disk="2"
|
|||
var_cpu="2"
|
||||
var_ram="1024"
|
||||
var_os="alpine"
|
||||
var_version="3.18"
|
||||
var_version="3.19"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -24,7 +24,7 @@ var_disk="0.3"
|
|||
var_cpu="1"
|
||||
var_ram="256"
|
||||
var_os="alpine"
|
||||
var_version="3.18"
|
||||
var_version="3.19"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -24,7 +24,7 @@ var_disk="0.3"
|
|||
var_cpu="1"
|
||||
var_ram="256"
|
||||
var_os="alpine"
|
||||
var_version="3.18"
|
||||
var_version="3.19"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -24,7 +24,7 @@ var_disk="0.1"
|
|||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_os="alpine"
|
||||
var_version="3.18"
|
||||
var_version="3.19"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
|
|
@ -340,12 +340,14 @@ advanced_settings() {
|
|||
echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}"
|
||||
fi
|
||||
|
||||
if [ "$var_os" != "alpine" ]; then
|
||||
if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then
|
||||
APT_CACHER="${APT_CACHER_IP:+yes}"
|
||||
echo -e "${DGN}Using APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
fi
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
|
||||
DISABLEIP6="yes"
|
||||
|
|
|
@ -154,7 +154,16 @@ network_check() {
|
|||
update_os() {
|
||||
msg_info "Updating Container OS"
|
||||
if [[ "$CACHER" == "yes" ]]; then
|
||||
echo "Acquire::http { Proxy \"http://${CACHER_IP}:3142\"; };" >/etc/apt/apt.conf.d/00aptproxy
|
||||
echo "Acquire::http::Proxy-Auto-Detect \"/usr/local/bin/apt-proxy-detect.sh\";" >/etc/apt/apt.conf.d/00aptproxy
|
||||
cat <<EOF >/usr/local/bin/apt-proxy-detect.sh
|
||||
#!/bin/bash
|
||||
if nc -w1 -z "${CACHER_IP}" 3142; then
|
||||
echo -n "http://${CACHER_IP}:3142"
|
||||
else
|
||||
echo -n "DIRECT"
|
||||
fi
|
||||
EOF
|
||||
chmod +x /usr/local/bin/apt-proxy-detect.sh
|
||||
fi
|
||||
$STD apt-get update
|
||||
$STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
|
||||
|
|
Loading…
Reference in New Issue