2022-11-06 21:27:50 +01:00
|
|
|
#!/bin/usr
|
2022-12-12 13:56:35 +01:00
|
|
|
|
|
|
|
# Test du user ROOT
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
|
|
then echo "Please run as root"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2022-11-06 21:27:50 +01:00
|
|
|
file_apt_proxy="/etc/apt/apt.conf.d/01proxy"
|
|
|
|
file_http_proxy="/etc/profile.d/proxy.sh"
|
|
|
|
|
|
|
|
echo "Acquire::http::Proxy \"http://192.168.1.45:3142\";" > $file_apt_proxy
|
|
|
|
|
|
|
|
echo "export HTTP_PROXY=\"http://192.168.1.45:3128\"" > $file_http_proxy
|
2022-11-06 21:36:36 +01:00
|
|
|
echo "export HTTPS_PROXY=\"http://192.168.1.45:3128\"" >> $file_http_proxy
|
|
|
|
echo "export FTP_PROXY=\"http://192.168.1.45:3128\"" >> $file_http_proxy
|
2022-11-06 21:27:50 +01:00
|
|
|
|