-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
33 lines (30 loc) · 1.08 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
sourcePath="/usr/local/ssr_hhx" # ssr路径
killall python
if [ ! -d "$sourcePath" ]; then
mkdir "$sourcePath"
fi
cd $sourcePath
if [ -f '/etc/redhat-release' ] ; then
yum update
yum install -y python git
else
source /etc/os-release
cd "$sourcePath"
if [ "$ID" = "debian" ] || [ "$ID" = "ubuntu" ] ; then
apt-get update
apt-get install -y python git psmisc
elif [ "$ID" = "centos" ]; then
yum update
yum install -y python git psmisc
else
echo "shit ϵͳ������ ��github������issue "
echo "https://github.com/huanghuixin1/shadowsocksr.git"
fi
fi
git clone https://github.com/huanghuixin1/shadowsocksr.git
python /usr/local/ssr_hhx/shadowsocksr/shadowsocks/server.py -p 8899 -k 52hhx.com -m none -O auth_chain_a &
chmod +x /etc/rc.local
# 倒数第二行添加
sed -i '$i\python /usr/local/ssr_hhx/shadowsocksr/shadowsocks/server.py -p 8899 -k 52hhx.com -m none -O auth_chain_a &' /etc/rc.local
systemctl enable rc-local
exit 0