Skip to content
Snippets Groups Projects
Verified Commit 2bcbd2c0 authored by David Beniamine's avatar David Beniamine
Browse files

installAptCacher.sh

parent efce70fc
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
apt-get update
apt-get -y install apt-cacher-ng
sed -i -e 's/^# \(Port:3142\)/\1/' /etc/apt-cacher-ng/acng.conf
systemctl start apt-cacher-ng.service
systemctl enable apt-cacher-ng.service
if [ -z "`grep Acquire::Http::Proxy /etc/apt/apt.conf.d/70debconf`" ]
then
echo 'Acquire::Http::Proxy "http://127.0.0.1:3142";' >> \
/etc/apt/apt.conf.d/70debconf
fi
ufw allow from $(ip a | awk '/inet .* (eth|enp)/{print $2}') to any port 3142
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment