Fix get public IP problem
This commit is contained in:
parent
8968409593
commit
6d214d588d
|
|
@ -18,9 +18,6 @@ echo "#"
|
||||||
echo "#############################################################"
|
echo "#############################################################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Get IP address(Default No.1)
|
|
||||||
IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.*' | cut -d: -f2 | awk '{ print $1}' | head -1`;
|
|
||||||
|
|
||||||
# Install Shadowsocks-libev
|
# Install Shadowsocks-libev
|
||||||
function install_shadowsocks_libev(){
|
function install_shadowsocks_libev(){
|
||||||
rootness
|
rootness
|
||||||
|
|
@ -70,7 +67,13 @@ function pre_install(){
|
||||||
echo "Press any key to start...or Press Ctrl+C to cancel"
|
echo "Press any key to start...or Press Ctrl+C to cancel"
|
||||||
char=`get_char`
|
char=`get_char`
|
||||||
#Install necessary dependencies
|
#Install necessary dependencies
|
||||||
apt-get install -y wget unzip build-essential autoconf libtool libssl-dev
|
apt-get install -y wget unzip curl build-essential autoconf libtool libssl-dev
|
||||||
|
# Get IP address
|
||||||
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
|
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||||
|
if [ -z $IP ]; then
|
||||||
|
IP=`curl -s ifconfig.me/ip`
|
||||||
|
fi
|
||||||
#Current folder
|
#Current folder
|
||||||
cur_dir=`pwd`
|
cur_dir=`pwd`
|
||||||
cd $cur_dir
|
cd $cur_dir
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,6 @@ echo "#"
|
||||||
echo "#############################################################"
|
echo "#############################################################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Get IP address(Default No.1)
|
|
||||||
IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.*' | cut -d: -f2 | awk '{ print $1}' | head -1`;
|
|
||||||
|
|
||||||
# Install Shadowsocks-libev
|
# Install Shadowsocks-libev
|
||||||
function install_shadowsocks_libev(){
|
function install_shadowsocks_libev(){
|
||||||
rootness
|
rootness
|
||||||
|
|
@ -73,6 +70,12 @@ function pre_install(){
|
||||||
#Install necessary dependencies
|
#Install necessary dependencies
|
||||||
yum install -y wget unzip openssl-devel gcc swig python python-devel python-setuptools autoconf libtool libevent
|
yum install -y wget unzip openssl-devel gcc swig python python-devel python-setuptools autoconf libtool libevent
|
||||||
yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
|
yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
|
||||||
|
# Get IP address
|
||||||
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
|
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||||
|
if [ -z $IP ]; then
|
||||||
|
IP=`curl -s ifconfig.me/ip`
|
||||||
|
fi
|
||||||
#Current folder
|
#Current folder
|
||||||
cur_dir=`pwd`
|
cur_dir=`pwd`
|
||||||
cd $cur_dir
|
cd $cur_dir
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ echo "#"
|
||||||
echo "#############################################################"
|
echo "#############################################################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Get IP address(Default No.1)
|
|
||||||
IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.*' | cut -d: -f2 | awk '{ print $1}' | head -1`;
|
|
||||||
# Get Nodejs latest version
|
# Get Nodejs latest version
|
||||||
NODEJS_VER=`curl -s http://nodejs.org/download/ | awk -F'<b>' '/Current version/{print $2}' | cut -d '<' -f 1`
|
NODEJS_VER=`curl -s http://nodejs.org/download/ | awk -F'<b>' '/Current version/{print $2}' | cut -d '<' -f 1`
|
||||||
|
|
||||||
|
|
@ -75,6 +73,12 @@ function pre_install(){
|
||||||
#Install necessary dependencies
|
#Install necessary dependencies
|
||||||
yum install -y wget unzip openssl-devel gcc swig python python-devel python-setuptools autoconf libtool libevent
|
yum install -y wget unzip openssl-devel gcc swig python python-devel python-setuptools autoconf libtool libevent
|
||||||
yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
|
yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
|
||||||
|
# Get IP address
|
||||||
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
|
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||||
|
if [ -z $IP ]; then
|
||||||
|
IP=`curl -s ifconfig.me/ip`
|
||||||
|
fi
|
||||||
#Current folder
|
#Current folder
|
||||||
cur_dir=`pwd`
|
cur_dir=`pwd`
|
||||||
cd $cur_dir
|
cd $cur_dir
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,6 @@ echo "#"
|
||||||
echo "#############################################################"
|
echo "#############################################################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Get IP address
|
|
||||||
IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.*' | cut -d: -f2 | awk '{ print $1}' | head -1`;
|
|
||||||
|
|
||||||
# Install Shadowsocks
|
# Install Shadowsocks
|
||||||
function install_shadowsocks(){
|
function install_shadowsocks(){
|
||||||
rootness
|
rootness
|
||||||
|
|
@ -73,6 +70,12 @@ function pre_install(){
|
||||||
#Install necessary dependencies
|
#Install necessary dependencies
|
||||||
yum install -y wget unzip openssl-devel gcc swig python python-devel python-setuptools autoconf libtool libevent
|
yum install -y wget unzip openssl-devel gcc swig python python-devel python-setuptools autoconf libtool libevent
|
||||||
yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
|
yum install -y automake make curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
|
||||||
|
# Get IP address
|
||||||
|
echo "Getting Public IP address, Please wait a moment..."
|
||||||
|
IP=`curl -s checkip.dyndns.com | cut -d' ' -f 6 | cut -d'<' -f 1`
|
||||||
|
if [ -z $IP ]; then
|
||||||
|
IP=`curl -s ifconfig.me/ip`
|
||||||
|
fi
|
||||||
#Current folder
|
#Current folder
|
||||||
cur_dir=`pwd`
|
cur_dir=`pwd`
|
||||||
cd $cur_dir
|
cd $cur_dir
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user