1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-28 23:23:08 +00:00

Make apt-cacher-ng a client of its own server (#4092)

Per https://askubuntu.com/questions/1503184/apt-cacher-ng-not-caching-packages-installed-on-the-server
This commit is contained in:
Patrick Cudahy 2025-04-28 14:50:47 +02:00 committed by GitHub
parent 04d6171cba
commit 246c6e950d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,9 @@ update_os
msg_info "Installing Apt-Cacher NG" msg_info "Installing Apt-Cacher NG"
DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y apt-cacher-ng DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y apt-cacher-ng
sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .*/' /etc/apt-cacher-ng/acng.conf sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .*/' /etc/apt-cacher-ng/acng.conf
cat << EOF >/etc/apt/apt.conf.d/00aptproxy.conf
Acquire::http::Proxy "http://localhost:3142";
EOF
systemctl enable -q --now apt-cacher-ng systemctl enable -q --now apt-cacher-ng
msg_ok "Installed Apt-Cacher NG" msg_ok "Installed Apt-Cacher NG"