Optimization output messages when install failed

This commit is contained in:
Teddysun 2014-03-21 17:10:26 +08:00
parent 76ea5c5733
commit ab15020001

View File

@ -74,7 +74,10 @@ function pre_install(){
# Download files # Download files
function download_files(){ function download_files(){
if [ -s ez_setup.py ]; then #Current folder
cur_dir=`pwd`
cd $cur_dir
if [ -f ez_setup.py ]; then
echo "ez_setup.py [found]" echo "ez_setup.py [found]"
else else
echo "ez_setup.py not found!!!download now......" echo "ez_setup.py not found!!!download now......"
@ -117,11 +120,18 @@ function install(){
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
python ez_setup.py install python ez_setup.py install
easy_install pip easy_install pip
if [ -f /usr/bin/pip ]; then
pip install shadowsocks pip install shadowsocks
pip install M2Crypto pip install M2Crypto
pip install greenlet pip install greenlet
pip install gevent pip install gevent
if [ -f /usr/bin/ssserver ]; then
nohup ssserver -c /etc/config.json > /dev/null 2>&1 & nohup ssserver -c /etc/config.json > /dev/null 2>&1 &
else
echo ""
echo "Shadowsocks install failed! Please visit http://teddysun.com/342.html and contact."
echo ""
fi
clear clear
echo "" echo ""
echo "Congratulations, shadowsocks install completed!" echo "Congratulations, shadowsocks install completed!"
@ -135,6 +145,11 @@ function install(){
echo "Enjoy it! ^_^" echo "Enjoy it! ^_^"
echo "" echo ""
echo "" echo ""
else
echo ""
echo "pip install failed! Please visit http://teddysun.com/342.html and contact."
echo ""
fi
} }
# Uninstall Shadowsocks # Uninstall Shadowsocks