forked from iMeiji/shadowsocks_install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debian_netspeeder_tennfy.sh
40 lines (30 loc) · 1.11 KB
/
debian_netspeeder_tennfy.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
33
34
35
36
37
38
39
40
#!/bin/bash
# Check if user is root
if [ $(id -u) != "0" ]; then
printf "Error: You must be root to run this script!\n"
exit 1
fi
echo "=========================================================================\n"
printf "Auto install net-speeder on your vps,written by tennfy \n"
printf "Version 0.1 \n"
apt-get update
apt-get install libnet1 libpcap0.8
apt-get install libnet1-dev libpcap0.8-dev
apt-get install gcc
cd ~
wget --no-check-certificate https://github.com/snooda/net-speeder/raw/master/net_speeder.c
wget --no-check-certificate https://github.com/snooda/net-speeder/raw/master/build.sh
chmod +x build.sh
if [ -f /proc/user_beancounters ] || [ -d /proc/bc ]; then
sh build.sh -DCOOKED
INTERFACE=venet0
else
sh build.sh
INTERFACE=eth0
fi
nohup /root/net_speeder $INTERFACE "ip" >/dev/null 2>&1 &
sed -i 's/exit\ 0/#exit\ 0/' /etc/rc.local
echo 'nohup /root/net_speeder $INTERFACE "ip" >/dev/null 2>&1 &' >> /etc/rc.local
echo exit 0 >> /etc/rc.local
echo "=========================================================================\n"
echo "Auto install net-speeder Complete!Good Bye!"