File tree 2 files changed +16
-6
lines changed
2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 17
17
type=$1
18
18
fi
19
19
20
+ keep=$2
21
+
20
22
run () {
21
23
if ps aux | grep cloudflared | grep -v " grep" > /dev/null; then
22
24
return
70
72
cat list
71
73
}
72
74
75
+ if [ " $keep " = " list" ]; then
76
+ export_list
77
+ exit 0
78
+ fi
79
+
73
80
if [[ " $type " == " 1" || " $type " == " 3" ]]; then
74
81
run
75
82
fi
76
83
if [[ " $type " == " 1" || " $type " == " 2" || " $type " == " 3" ]]; then
77
84
chmod +x ./serv00sb
78
- if ps aux | grep serv00sb | grep -v " grep" > /dev/null; then
79
- exit 0
85
+ if ! ps aux | grep serv00sb | grep -v " grep" > /dev/null; then
86
+ nohup ./serv00sb run -c ./config.json > /dev/null 2>&1 &
80
87
fi
81
- nohup ./serv00sb run -c ./config.json > /dev/null 2>&1 &
82
88
83
89
fi
84
- export_list
90
+ if [ -z " $keep " ]; then
91
+ export_list
92
+ fi
Original file line number Diff line number Diff line change @@ -259,11 +259,13 @@ showSingBoxInfo(){
259
259
red " 配置文件不存在,请先行配置!"
260
260
return
261
261
fi
262
-
263
262
if [ ! -e list ]; then
264
263
red " 请先运行sing-box"
265
264
fi
266
- cat ./list
265
+ config=" singbox.json"
266
+ type=$( jq -r " .TYPE" $config )
267
+ chmod +x ./start.sh && ./start.sh $type list
268
+
267
269
}
268
270
269
271
writeWX (){
You can’t perform that action at this time.
0 commit comments