This commit is contained in:
Your Name
2026-09-03 08:38:17 +08:00
parent 6cd4f1b1db
commit 842990b0e7
1853 changed files with 278406 additions and 361 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail
umask 0027
# BaoTa sends SIGTERM and immediately starts the replacement. go-zero drains
# existing connections asynchronously, so wait for the old listener to close.
for attempt in $(seq 1 120); do
if ! /usr/sbin/ss -H -ltn 'sport = :18888' | /usr/bin/grep -q .; then
exec /www/server/xingyu-im/bt/xingyu-api
fi
sleep 0.25
done
printf '%s\n' 'Cannot start Xingyu: local port 18888 is still occupied after 30 seconds.' >&2
exit 1