enabling offline use

This commit is contained in:
Sam
2025-01-02 12:14:29 +10:00
parent 170dc2f569
commit e9f30734a3
207 changed files with 269 additions and 215 deletions
+6 -10
View File
@@ -530,12 +530,8 @@ advanced_settings() {
APT_CACHER=""
APT_CACHER_IP=""
else
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 "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
else
exit_script
fi
APT_CACHER_IP="192.168.1.230" # Hard-coded IP for APT-Cacher
echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP}${CL}"
fi
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
@@ -767,9 +763,9 @@ build_container() {
TEMP_DIR=$(mktemp -d)
pushd $TEMP_DIR >/dev/null
if [ "$var_os" == "alpine" ]; then
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/alpine-install.func)"
export FUNCTIONS_FILE_PATH="/root/proxmox-work/Proxmox/misc/alpine-install.func"
else
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/install.func)"
export FUNCTIONS_FILE_PATH="/root/proxmox-work/Proxmox/misc/install.func"
fi
export CACHER="$APT_CACHER"
export CACHER_IP="$APT_CACHER_IP"
@@ -799,7 +795,7 @@ build_container() {
$PW
"
# This executes create_lxc.sh and creates the container and .conf file
bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/ct/create_lxc.sh)" || exit
bash /root/proxmox-work/Proxmox/ct/create_lxc.sh || exit
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
if [ "$CT_TYPE" == "0" ]; then
@@ -861,7 +857,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
EOF'
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
fi
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/install/$var_install.sh)" || exit
lxc-attach -n "$CTID" -- bash /root/proxmox-work/Proxmox/install/$var_install.sh || exit
}