diff --git a/lila-docker b/lila-docker index 747cc07a..a4a51fd8 100755 --- a/lila-docker +++ b/lila-docker @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash set -e @@ -56,6 +56,7 @@ run_start() { COMPOSE_PROFILES=$(all_profiles) docker compose start else echo "There are no stopped services to resume" + exit 1 fi fi } @@ -222,7 +223,7 @@ show_help() { echo " build Pre-fetch and pre-build all the images necessary for the containers" echo " format Run the code formatter to match Lichess code style" echo " hostname Set the hostname to something different than the default localhost" - echo " mobile For mobile app development.Pair and connect to a mobile device" + echo " mobile For mobile app development. Pair and connect to a mobile device" echo " flutter Get the 'flutter run' command with the URL arguments pre-configured" echo " db Reset and re-seed the database with fresh fake data" echo " lila clean Run 'sbt clean' in the lila container. Useful if there are compilation errors" @@ -288,7 +289,11 @@ case "$@" in ;; "status") docker info --format '{{ .OperatingSystem }}, {{ .ClientInfo.Version }}, {{ .ClientInfo.Os }} {{ .ClientInfo.Arch }}' - docker compose ps + if [ -n "$(docker compose ps -q 2>/dev/null)" ]; then + docker compose ps + else + echo "No lila-docker services are running" + fi echo "----------------------------" ./pull-all ;;