фикс скриптов

This commit is contained in:
2026-03-09 13:52:02 +04:00
parent b2bed8941e
commit db6c122d88
3 changed files with 26 additions and 4 deletions
+25 -2
View File
@@ -31,6 +31,27 @@ log() {
printf '[start-server] %s\n' "$*"
}
require_docker() {
if ! command -v docker >/dev/null 2>&1; then
printf 'docker is not installed or not in PATH\n' >&2
exit 1
fi
if ! docker compose version >/dev/null 2>&1; then
printf 'docker compose plugin is not available\n' >&2
printf 'On Ubuntu install: docker-compose-plugin\n' >&2
exit 1
fi
if ! docker info >/dev/null 2>&1; then
printf 'docker daemon is not reachable\n' >&2
printf 'On Ubuntu run: sudo systemctl enable --now docker\n' >&2
printf 'If docker is running but you are a non-root user, add your user to the docker group:\n' >&2
printf ' sudo usermod -aG docker $USER && newgrp docker\n' >&2
exit 1
fi
}
while (($#)); do
case "$1" in
--no-build)
@@ -54,8 +75,10 @@ done
cd "$ROOT_DIR"
require_docker
log "applying module configuration"
"$ROOT_DIR/setup-modules.sh"
bash "$ROOT_DIR/setup-modules.sh"
log "starting docker services"
if [[ -n "$BUILD_FLAG" ]]; then
@@ -65,7 +88,7 @@ else
fi
log "synchronizing realmlist"
"$ROOT_DIR/sync-realmlist.sh"
bash "$ROOT_DIR/sync-realmlist.sh"
log "current service status"
docker compose ps