fix apt-cacher heredoc (#6385)

This commit is contained in:
CanbiZ 2025-07-30 15:31:00 +02:00 committed by GitHub
parent 9f1431b263
commit 23573bfce9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,8 +131,8 @@ network_check() {
update_os() {
msg_info "Updating Container OS"
if [[ "$CACHER" == "yes" ]]; then
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
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"