Skip to content

Commit

Permalink
添加ss卸载功能
Browse files Browse the repository at this point in the history
  • Loading branch information
flyzy2005 committed Apr 4, 2018
1 parent da3525e commit 505cb4d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
21 changes: 19 additions & 2 deletions ss-fly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ install() {
pip install shadowsocks
chmod 755 /etc/shadowsocks.json
apt-get install python-m2crypto
ps -fe|grep ssserver |grep -v grep
ps -fe|grep ssserver |grep -v grep > /dev/null 2>&1
if [ $? -ne 0 ]
then
ssserver -c /etc/shadowsocks.json -d start
Expand All @@ -54,7 +54,9 @@ install() {
then
sed -i '$i\ssserver -c /etc/shadowsocks.json -d start' /etc/rc.local
fi
echo '安装成功~尽情冲浪吧'
echo "安装成功~尽情冲浪吧
您的配置文件内容如下(server在客户端中需要配置成你VPS的IP):"
cat /etc/shadowsocks.json
}

install_bbr() {
Expand Down Expand Up @@ -95,6 +97,18 @@ install_ssr() {
./shadowsocksR.sh 2>&1 | tee shadowsocksR.log
}

uninstall_ss() {
ps -fe|grep ssserver |grep -v grep > /dev/null 2>&1
if [ $? -eq 0 ]
then
ssserver -c /etc/shadowsocks.json -d stop
fi
pip uninstall -y shadowsocks
rm /etc/shadowsocks.json
rm /var/log/shadowsocks.log
echo 'shadowsocks卸载成功'
}

if [ "$#" -eq 0 ]; then
usage
exit 0
Expand Down Expand Up @@ -126,6 +140,9 @@ case $1 in
-ssr )
install_ssr
;;
-uninstall )
uninstall_ss
;;
* )
usage
;;
Expand Down
8 changes: 6 additions & 2 deletions sshelp
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
声明:
只在Vultr的Ubuntu16.04上测试了
一键脚本在Ubuntu16.04搭建ss/ssr服务
用法:
显示版本:
ss-fly.sh -v|v|version
显示帮助:
ss-fly.sh [-h|h|help]
一键安装:
一键安装ss:
ss-fly.sh -i|i|install
一键卸载ss:
ss-fly.sh -uninstall
一键安装ssr:
ss-fly.sh -ssr
安装BBR加速:
ss-fly.sh -bbr

0 comments on commit 505cb4d

Please sign in to comment.