Skip to content

Commit

Permalink
修复ct8 alist启动失败问题
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejun committed Oct 25, 2024
1 parent 9dad74d commit 65fc7bd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions keepalive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,17 @@ checkAlistAlive() {
return 1
fi
}
isServ00() {
return $(hostname | grep 'serv00')
}

startAlist() {
user="$(whoami)"
domain="alist.$user.serv00.net"
if isServ00; then
domain="alist.$user.serv00.net"
else
domain="alist.$user.ct8.pl"
fi
webpath="${installpath}/domains/$domain/public_html/"

if [[ -d "$webpath/data" && -e "$webpath/alist" ]]; then
Expand Down Expand Up @@ -293,7 +300,6 @@ for obj in "${monitor[@]}"; do
fi
elif [ "$obj" == "alist" ]; then
if ! checkAlistAlive; then
cd ${installpath}/serv00-play/dmtg
startAlist
sleep 5
if ! checkAlistAlive; then
Expand Down

0 comments on commit 65fc7bd

Please sign in to comment.