linux-presets/apt-cacher/setup.sh

13 lines
290 B
Bash
Raw Permalink Normal View History

2024-07-01 20:58:28 +02:00
#!/bin/bash
IP="192.168.179.107"
# Ping the IP address to check if it is reachable
if ping -c 1 $IP &> /dev/null
then
echo 'Acquire::http { Proxy "http://192.168.179.107:3142"; }' | sudo tee -a /etc/apt/apt.conf.d/proxy
else
echo "IP $IP is not reachable. Exiting."
exit 1
fi