shadows全自动安装脚本
kevin.Zhu 发布于:2017-7-1 17:58 分类:Shell 有 25 人浏览,获得评论 0 条
#!/bin/bash
# shadowsocks Python version installer. fit for Ubuntu/debian/centos
# kevin.zhu
serv=$(which ssserver)
if [ -n "$serv" ]; then
echo "ssserver is already installed"; exit;
fi
# chk python env
py_chk=$(which python)
if [ -z "$py_chk" ]; then
arch=$(cat /etc/issue | egrep -i "ubuntu|debian")
if [ -n "$arch" ];then
apt-get install -y python
elif [ -n $(cat /etc/issue | egrep -i centos) ]; then
yum install -y python
fi
else
echo "python is already installed"
fi
# install ssserver/sslocal
mkdir /tmp/ez_setup
wget -c -O- "https://pypi.python.org/packages/ba/2c/743df41bd6b3298706dfe91b0c7ecdc47f2dc1a3104abeb6e9aa4a45fa5d/ez_setup-0.9.tar.gz" | tar zxvf - --strip-components 1 -C /tmp/ez_setup && python /tmp/ez_setup/ez_setup.py && easy_install pip && easy_install shadowsocks