-
Notifications
You must be signed in to change notification settings - Fork 3
/
easyinstall
33 lines (33 loc) · 1.18 KB
/
easyinstall
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
33
#!/bin/bash
echo "#!/bin/bash
if [ "'$1'" == start ]
then
badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 1000 --max-connections-for-client 10 > /dev/null &
echo 'Badvpn rodando na porta 7300'
fi
if [ "'$1'" == stop ]
then
badvpnpid="'$(ps x |grep badvpn |grep -v grep |awk '"{'"'print $1'"'})
kill -9 "'"$badvpnpid" >/dev/null 2>/dev/null
kill $badvpnpid > /dev/null 2> /dev/null
kill "$badvpnpid" > /dev/null 2>/dev/null''
kill $(ps x |grep badvpn |grep -v grep |awk '"{'"'print $1'"'})
killall badvpn-udpgw
fi" > /bin/badvpn
chmod +x /bin/badvpn
if [ -f /usr/bin/badvpn-udpgw ]; then
echo -e "\033[1;32mBadvpn ja esta instalado\033[0m"
rm -rf easyinstall >/dev/null 2>/dev/null
exit
else
clear
fi
echo -e "\033[1;31m Instalador Badvpn\n\033[0m"
echo -e "Fazendo download do Badvpn"
wget -O /usr/bin/badvpn-udpgw https://github.com/twossh/vpspack/blob/master/badvpn-udpgw?raw=true -o /dev/null
chmod +x /usr/bin/badvpn-udpgw
clear
echo -e "\033[1;32m Instalação completa\033[0m"
echo -e "\033[1;37mComandos:\n\033[1;31mbadvpn start\033[1;37m para iniciar o badvpn"
echo -e "\033[1;31mbadvpn stop \033[1;37m para parar o badvpn\033[0m"
rm -rf easyinstall >/dev/null 2>/dev/null