update comments
This commit is contained in:
parent
d1952e32fe
commit
6b459ea157
|
|
@ -2,7 +2,7 @@
|
||||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
export PATH
|
export PATH
|
||||||
#===================================================================#
|
#===================================================================#
|
||||||
# System Required: CentOS6 or 7 #
|
# System Required: CentOS 6 or 7 #
|
||||||
# Description: Install Shadowsocks-libev server for CentOS 6 or 7 #
|
# Description: Install Shadowsocks-libev server for CentOS 6 or 7 #
|
||||||
# Author: Teddysun <i@teddysun.com> #
|
# Author: Teddysun <i@teddysun.com> #
|
||||||
# Thanks: @madeye <https://github.com/madeye> #
|
# Thanks: @madeye <https://github.com/madeye> #
|
||||||
|
|
@ -12,6 +12,9 @@ export PATH
|
||||||
# Current folder
|
# Current folder
|
||||||
cur_dir=`pwd`
|
cur_dir=`pwd`
|
||||||
|
|
||||||
|
libsodium_file="libsodium-1.0.11"
|
||||||
|
libsodium_url="https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz"
|
||||||
|
|
||||||
# Make sure only root can run our script
|
# Make sure only root can run our script
|
||||||
rootness(){
|
rootness(){
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
|
@ -262,8 +265,8 @@ download_files(){
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! wget --no-check-certificate -O libsodium-1.0.11.tar.gz https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz; then
|
if ! wget --no-check-certificate -O ${libsodium_file}.tar.gz ${libsodium_url}; then
|
||||||
echo "Failed to download libsodium-1.0.11.tar.gz"
|
echo "Failed to download ${libsodium_file}.tar.gz"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -338,13 +341,17 @@ firewall_set(){
|
||||||
|
|
||||||
# Install Shadowsocks-libev
|
# Install Shadowsocks-libev
|
||||||
install_shadowsocks(){
|
install_shadowsocks(){
|
||||||
tar zxf libsodium-1.0.11.tar.gz
|
if [ ! -f /usr/local/lib/libsodium.a ]; then
|
||||||
cd libsodium-1.0.11
|
cd ${cur_dir}
|
||||||
./configure && make && make install
|
tar zxf ${libsodium_file}.tar.gz
|
||||||
if [ $? -ne 0 ]; then
|
cd ${libsodium_file}
|
||||||
echo "libsodium install failed!"
|
./configure && make && make install
|
||||||
exit 1
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "${libsodium_file} install failed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
|
echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
|
||||||
ldconfig
|
ldconfig
|
||||||
|
|
||||||
|
|
@ -373,7 +380,7 @@ install_shadowsocks(){
|
||||||
|
|
||||||
cd ${cur_dir}
|
cd ${cur_dir}
|
||||||
rm -rf ${shadowsocks_libev_ver} ${shadowsocks_libev_ver}.tar.gz
|
rm -rf ${shadowsocks_libev_ver} ${shadowsocks_libev_ver}.tar.gz
|
||||||
rm -rf libsodium-1.0.11 libsodium-1.0.11.tar.gz
|
rm -rf ${libsodium_file} ${libsodium_file}.tar.gz
|
||||||
|
|
||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user