Change shadowsocks-libev to version 2.4.7
This commit is contained in:
parent
13a4d9300e
commit
aa9b36cd3c
|
|
@ -19,6 +19,10 @@ echo "# Thanks: @m0d8ye <https://twitter.com/m0d8ye> #"
|
||||||
echo "#############################################################"
|
echo "#############################################################"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
#Current folder
|
||||||
|
cur_dir=`pwd`
|
||||||
|
shadowsocks_libev_ver="shadowsocks-libev-2.4.7"
|
||||||
|
|
||||||
# Make sure only root can run our script
|
# Make sure only root can run our script
|
||||||
function rootness(){
|
function rootness(){
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
|
@ -93,31 +97,28 @@ function pre_install(){
|
||||||
fi
|
fi
|
||||||
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
|
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
|
||||||
echo
|
echo
|
||||||
#Current folder
|
|
||||||
cur_dir=`pwd`
|
|
||||||
cd $cur_dir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download latest shadowsocks-libev
|
# Download latest shadowsocks-libev
|
||||||
function download_files(){
|
function download_files(){
|
||||||
if [ -f shadowsocks-libev.zip ];then
|
if [ -f ${shadowsocks_libev_ver}.zip ];then
|
||||||
echo "shadowsocks-libev.zip [found]"
|
echo "${shadowsocks_libev_ver}.zip [found]"
|
||||||
else
|
else
|
||||||
if ! wget --no-check-certificate https://github.com/shadowsocks/shadowsocks-libev/archive/master.zip -O shadowsocks-libev.zip;then
|
if ! wget --no-check-certificate https://github.com/shadowsocks/shadowsocks-libev/archive/v2.4.7.zip -O ${shadowsocks_libev_ver}.zip;then
|
||||||
echo "Failed to download shadowsocks-libev.zip"
|
echo "Failed to download ${shadowsocks_libev_ver}.zip"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unzip shadowsocks-libev.zip
|
unzip ${shadowsocks_libev_ver}.zip
|
||||||
if [ $? -eq 0 ];then
|
if [ $? -eq 0 ];then
|
||||||
cd $cur_dir/shadowsocks-libev-master/
|
cd ${cur_dir}/${shadowsocks_libev_ver}/
|
||||||
if ! wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-libev-debian; then
|
if ! wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-libev-debian; then
|
||||||
echo "Failed to download shadowsocks-libev start script!"
|
echo "Failed to download shadowsocks-libev start script!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "Unzip shadowsocks-libev failed! Please visit https://teddysun.com/358.html and contact."
|
echo "Unzip ${shadowsocks_libev_ver}.zip failed! Please visit https://teddysun.com/358.html and contact."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +152,7 @@ function install_libev(){
|
||||||
make && make install
|
make && make install
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
# Add run on system start up
|
# Add run on system start up
|
||||||
mv $cur_dir/shadowsocks-libev-master/shadowsocks-libev-debian /etc/init.d/shadowsocks
|
mv ${cur_dir}/${shadowsocks_libev_ver}/shadowsocks-libev-debian /etc/init.d/shadowsocks
|
||||||
chmod +x /etc/init.d/shadowsocks
|
chmod +x /etc/init.d/shadowsocks
|
||||||
update-rc.d -f shadowsocks defaults
|
update-rc.d -f shadowsocks defaults
|
||||||
# Run shadowsocks in the background
|
# Run shadowsocks in the background
|
||||||
|
|
@ -168,11 +169,11 @@ function install_libev(){
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
cd $cur_dir
|
cd ${cur_dir}
|
||||||
# Delete shadowsocks-libev floder
|
# Delete shadowsocks-libev folder
|
||||||
rm -rf $cur_dir/shadowsocks-libev-master/
|
rm -rf ${cur_dir}/${shadowsocks_libev_ver}/
|
||||||
# Delete shadowsocks-libev zip file
|
# Delete shadowsocks-libev zip file
|
||||||
rm -f shadowsocks-libev.zip
|
rm -f ${cur_dir}/${shadowsocks_libev_ver}.zip
|
||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
echo "Congratulations, shadowsocks-libev install completed!"
|
echo "Congratulations, shadowsocks-libev install completed!"
|
||||||
|
|
@ -234,7 +235,6 @@ function uninstall_shadowsocks_libev(){
|
||||||
rm -f /usr/local/share/man/man1/ss-redir.1
|
rm -f /usr/local/share/man/man1/ss-redir.1
|
||||||
rm -f /usr/local/share/man/man1/ss-nat.1
|
rm -f /usr/local/share/man/man1/ss-nat.1
|
||||||
rm -f /usr/local/share/man/man8/shadowsocks.8
|
rm -f /usr/local/share/man/man8/shadowsocks.8
|
||||||
rm -fr /usr/local/share/doc/shadowsocks-libev
|
|
||||||
rm -f /etc/init.d/shadowsocks
|
rm -f /etc/init.d/shadowsocks
|
||||||
echo "Shadowsocks-libev uninstall success!"
|
echo "Shadowsocks-libev uninstall success!"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,10 @@ echo "# Thanks: @m0d8ye <https://twitter.com/m0d8ye> #"
|
||||||
echo "#############################################################"
|
echo "#############################################################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
#Current folder
|
||||||
|
cur_dir=`pwd`
|
||||||
|
shadowsocks_libev_ver="shadowsocks-libev-2.4.7"
|
||||||
|
|
||||||
# Make sure only root can run our script
|
# Make sure only root can run our script
|
||||||
function rootness(){
|
function rootness(){
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
|
@ -116,27 +120,24 @@ function pre_install(){
|
||||||
fi
|
fi
|
||||||
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
|
echo -e "Your main public IP is\t\033[32m$IP\033[0m"
|
||||||
echo ""
|
echo ""
|
||||||
#Current folder
|
|
||||||
cur_dir=`pwd`
|
|
||||||
cd $cur_dir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download latest shadowsocks-libev
|
# Download latest shadowsocks-libev
|
||||||
function download_files(){
|
function download_files(){
|
||||||
if [ -f shadowsocks-libev.zip ];then
|
if [ -f ${shadowsocks_libev_ver}.zip ];then
|
||||||
echo "shadowsocks-libev.zip [found]"
|
echo "${shadowsocks_libev_ver}.zip [found]"
|
||||||
else
|
else
|
||||||
if ! wget --no-check-certificate https://github.com/shadowsocks/shadowsocks-libev/archive/master.zip -O shadowsocks-libev.zip;then
|
if ! wget --no-check-certificate https://github.com/shadowsocks/shadowsocks-libev/archive/v2.4.7.zip -O ${shadowsocks_libev_ver}.zip;then
|
||||||
echo "Failed to download shadowsocks-libev.zip"
|
echo "Failed to download ${shadowsocks_libev_ver}.zip"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unzip shadowsocks-libev.zip
|
unzip ${shadowsocks_libev_ver}.zip
|
||||||
if [ $? -eq 0 ];then
|
if [ $? -eq 0 ];then
|
||||||
cd $cur_dir/shadowsocks-libev-master/
|
cd ${cur_dir}/${shadowsocks_libev_ver}/
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "Unzip shadowsocks-libev failed! Please visit https://teddysun.com/357.html and contact."
|
echo "Unzip ${shadowsocks_libev_ver}.zip failed! Please visit https://teddysun.com/357.html and contact."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Download start script
|
# Download start script
|
||||||
|
|
@ -213,7 +214,7 @@ function install(){
|
||||||
./configure
|
./configure
|
||||||
make && make install
|
make && make install
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
mv $cur_dir/shadowsocks-libev-master/shadowsocks-libev /etc/init.d/shadowsocks
|
mv ${cur_dir}/${shadowsocks_libev_ver}/shadowsocks-libev /etc/init.d/shadowsocks
|
||||||
chmod +x /etc/init.d/shadowsocks
|
chmod +x /etc/init.d/shadowsocks
|
||||||
# Add run on system start up
|
# Add run on system start up
|
||||||
chkconfig --add shadowsocks
|
chkconfig --add shadowsocks
|
||||||
|
|
@ -231,11 +232,11 @@ function install(){
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
cd $cur_dir
|
cd ${cur_dir}
|
||||||
# Delete shadowsocks-libev floder
|
# Delete shadowsocks-libev folder
|
||||||
rm -rf $cur_dir/shadowsocks-libev-master/
|
rm -rf ${cur_dir}/${shadowsocks_libev_ver}/
|
||||||
# Delete shadowsocks-libev zip file
|
# Delete shadowsocks-libev zip file
|
||||||
rm -f shadowsocks-libev.zip
|
rm -f ${cur_dir}/${shadowsocks_libev_ver}.zip
|
||||||
clear
|
clear
|
||||||
echo ""
|
echo ""
|
||||||
echo "Congratulations, shadowsocks-libev install completed!"
|
echo "Congratulations, shadowsocks-libev install completed!"
|
||||||
|
|
@ -286,7 +287,6 @@ function uninstall_shadowsocks_libev(){
|
||||||
rm -f /usr/local/share/man/man1/ss-redir.1
|
rm -f /usr/local/share/man/man1/ss-redir.1
|
||||||
rm -f /usr/local/share/man/man1/ss-nat.1
|
rm -f /usr/local/share/man/man1/ss-nat.1
|
||||||
rm -f /usr/local/share/man/man8/shadowsocks.8
|
rm -f /usr/local/share/man/man8/shadowsocks.8
|
||||||
rm -fr /usr/local/share/doc/shadowsocks-libev
|
|
||||||
rm -f /etc/init.d/shadowsocks
|
rm -f /etc/init.d/shadowsocks
|
||||||
echo "Shadowsocks-libev uninstall success!"
|
echo "Shadowsocks-libev uninstall success!"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user