One-command setup (SteamCMD + minqlx build), .env settings with a listed/unlisted switch, three factories (lgvamp, lgvamp_nolag, lgvamp100), warmup-text and welcome minqlx plugins, watchdog/backup/daily-restart, docs for admins and players. Co-Authored-By: Claude Opus 5.5 <[email protected]>
17 lines
736 B
Bash
Executable File
17 lines
736 B
Bash
Executable File
#!/bin/sh
|
|
# Daily clean restart (cron). Skipped while a human is playing (bots have address 'bot'), and also
|
|
# skipped if the player count can't be read: better a missed restart than kicking someone.
|
|
. "$(dirname "$0")/env.sh"
|
|
LOG=logs/watchdog.log
|
|
[ "$(docker inspect -f '{{.State.Status}}' "$NAME" 2>/dev/null)" = running ] || exit 0
|
|
H=$(python3 tools/qlq.py 127.0.0.1 "$QPORT" --humans 2>/dev/null)
|
|
case "$H" in
|
|
''|*[!0-9]*) echo "$(date '+%F %T') daily restart skipped: player count unknown" >> $LOG; exit 0 ;;
|
|
esac
|
|
if [ "$H" -gt 0 ]; then
|
|
echo "$(date '+%F %T') daily restart skipped: $H player(s) on" >> $LOG
|
|
exit 0
|
|
fi
|
|
echo "$(date '+%F %T') daily restart" >> $LOG
|
|
[ -n "$DRYRUN" ] || docker restart "$NAME" >/dev/null 2>&1
|