-
Notifications
You must be signed in to change notification settings - Fork 242
/
s5
41 lines (37 loc) · 841 Bytes
/
s5
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
34
35
36
37
38
39
#!/bin/bash
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
resName="wyx176"
versionFile=/etc/opt/ss5/version.txt
checkup(){
newVersion=`curl -s -L https://raw.githubusercontent.com/${resName}/Socks5/master/version.txt`
oldVersion=`cat $versionFile`
if [ $newVersion = $oldVersion ] ;then
echo "V"${oldVersion}
else
echo "有新版本V"$newVersion
fi
}
clear
echo -e "欢迎使用SOCKS5 \033[32m$(checkup)\033[0m\n"
echo "1.服务控制"
echo "2.用户管理"
echo "0.退出面板"
while :; do echo
read -p "请选择: " choice
if [[ ! $choice =~ ^[0-2]$ ]]; then
echo "输入错误! 请输入正确的数字!"
else
break
fi
done
if [[ $choice == 0 ]];then
exit 0
fi
if [[ $choice == 1 ]];then
clear
bash /etc/opt/ss5/service.sh
fi
if [[ $choice == 2 ]];then
clear
bash /etc/opt/ss5/user.sh
fi