-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_proxy.sh
32 lines (29 loc) · 1.11 KB
/
config_proxy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
principal(){
echo "Script de configuração do proxy do Ed"
sleep 2
arquivo="/etc/apt/apt.conf.d/80proxy"
if [ -f $arquivo ]; then
echo "O arquivo $arquivo já existe"
else
proxy
fi
executa
}
proxy(){
touch /etc/apt/apt.conf.d/80proxy
echo "Acquire::http::proxy \"http://<usuario>:<senha>@proxy.incolume.com.br:3128/\";" >> /etc/apt/apt.conf.d/80proxy
echo "Acquire::ftp::proxy \"http://<usuario>:<senha>@proxy.incolume.com.br:3128/\";" >> /etc/apt/apt.conf.d/80proxy
echo "Acquire::https::proxy \"http://<usuario>:<senha>@proxy.incolume.com.br:3128/\";" >> /etc/apt/apt.conf.d/80proxy
echo "export https_proxy=http://username:password@proxy.incolume.com.br:3128" >> ~/.bashrc
echo "export http_proxy=http://username:password@proxy.incolume.com.br:3128" >> ~/.bashrc
echo "export ftp_proxy=http://username:password@proxy.incolume.com.br:3128" >> ~/.bashrc
git config --global http.proxy http://username:senh@nov4@proxy.servername.com.br:3128
}
executa() {
#cd ~
echo "Script executado com sucesso"
source $HOME/.bashrc
#EXPORT DISPLAY=:0 #Para o WSL 'visual' usando Xming
}
principal