Adds end-to-end Linux compatibility work for the dedicated server: new CI workflow (Ubuntu + Arch), line-ending/executable safeguards, and a local venv-first startup flow with split dependency files for server vs optional host GUI tooling. Improves runtime resilience with better bind error messages, stricter config validation, writable-state checks, cleaner socket/thread shutdown behavior, and SIGTERM-aware graceful stop handling for headless/systemd use. Updates deployment/startup docs and adds portability/runtime integration tests to lock in these behaviors.
41 lines
997 B
Bash
41 lines
997 B
Bash
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
|
|
ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd -- "${ROOT}"
|
|
|
|
echo "==> Checking start.sh line endings (LF)"
|
|
python3 - <<'PY'
|
|
from pathlib import Path
|
|
data = Path("start.sh").read_bytes()
|
|
if b"\r\n" in data or data.count(b"\r"):
|
|
raise SystemExit("ERROR: start.sh contains CR/CRLF line endings")
|
|
PY
|
|
|
|
echo "==> Checking start.sh is executable"
|
|
test -x start.sh
|
|
|
|
echo "==> bash -n start.sh"
|
|
bash -n start.sh
|
|
|
|
if command -v shellcheck >/dev/null 2>&1; then
|
|
echo "==> shellcheck start.sh"
|
|
shellcheck start.sh
|
|
else
|
|
echo "WARNING: shellcheck not installed; skipping"
|
|
fi
|
|
|
|
echo "==> Creating clean virtual environment"
|
|
rm -rf .venv-ci
|
|
python3 -m venv .venv-ci
|
|
.venv-ci/bin/python -m pip install --upgrade pip
|
|
.venv-ci/bin/python -m pip install -r requirements-server.txt pytest
|
|
|
|
echo "==> compileall"
|
|
.venv-ci/bin/python -m compileall -q .
|
|
|
|
echo "==> pytest"
|
|
.venv-ci/bin/python -m pytest -q
|
|
|
|
echo "All Linux compatibility checks passed."
|