Created
April 17, 2017 02:45
-
-
Save shenqihui/7f4fbcf3883a469306f141d567067f4c to your computer and use it in GitHub Desktop.
net-speeder install for banwagong openvz vps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
sh build.sh -DCOOKED | |
nohup /root/net_speeder venet0 "ip" >/dev/null 2>&1 & | |
sed -i 's/exit\ 0/#exit\ 0/' /etc/rc.local | |
echo 'nohup /root/net_speeder venet0 "ip" >/dev/null 2>&1 &' >> /etc/rc.local | |
echo exit 0 >> /etc/rc.local | |
echo "=========================================================================\n" | |
echo "Auto install net-speeder Complete!Good Bye!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment