Skip to content

Commit 65fc7bd

Browse files
committed
修复ct8 alist启动失败问题
1 parent 9dad74d commit 65fc7bd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

keepalive.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,17 @@ checkAlistAlive() {
173173
return 1
174174
fi
175175
}
176+
isServ00() {
177+
return $(hostname | grep 'serv00')
178+
}
176179

177180
startAlist() {
178181
user="$(whoami)"
179-
domain="alist.$user.serv00.net"
182+
if isServ00; then
183+
domain="alist.$user.serv00.net"
184+
else
185+
domain="alist.$user.ct8.pl"
186+
fi
180187
webpath="${installpath}/domains/$domain/public_html/"
181188

182189
if [[ -d "$webpath/data" && -e "$webpath/alist" ]]; then
@@ -293,7 +300,6 @@ for obj in "${monitor[@]}"; do
293300
fi
294301
elif [ "$obj" == "alist" ]; then
295302
if ! checkAlistAlive; then
296-
cd ${installpath}/serv00-play/dmtg
297303
startAlist
298304
sleep 5
299305
if ! checkAlistAlive; then

0 commit comments

Comments
 (0)