2024-07-01 20:58:28 +02:00
|
|
|
#!/bin/bash
|
2024-07-07 16:18:47 +02:00
|
|
|
|
|
|
|
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
|