From fdef15cdf10f1f6d33f6ca873bccb6ea81d7716a Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Sun, 14 Dec 2025 09:19:35 +0100 Subject: [PATCH] Support Robust.Server fallback --- start.sh | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/start.sh b/start.sh index b9ad86b..bb6f837 100644 --- a/start.sh +++ b/start.sh @@ -6,17 +6,24 @@ if [ ! "$(ls -A /ss14)" ]; then cp -R /ss14-default/* /ss14/ fi -# Start the watchdog -cd /ss14/publish/ || exit 1 +# Locate the watchdog binary if it exists (older builds) +WATCHDOG_PATH=$(find /ss14 -maxdepth 4 -type f -name "SS14.Watchdog" | head -n 1) -if [ -x "./SS14.Watchdog" ]; then - exec ./SS14.Watchdog "$@" -elif [ -d "./SS14.Watchdog" ] && [ -x "./SS14.Watchdog/SS14.Watchdog" ]; then - cd ./SS14.Watchdog || exit 1 - exec ./SS14.Watchdog "$@" -elif [ -x "./Robust.Server" ]; then - exec ./Robust.Server "$@" -else - echo "No SS14.Watchdog or Robust.Server executable found in /ss14/publish" >&2 +if [ -n "$WATCHDOG_PATH" ]; then + WATCHDOG_DIR=$(dirname "$WATCHDOG_PATH") + cd "$WATCHDOG_DIR" || exit 1 + chmod +x "$WATCHDOG_PATH" + exec "$WATCHDOG_PATH" "$@" +fi + +# Fallback for new builds where only Robust.Server is shipped +SERVER_PATH=$(find /ss14 -maxdepth 4 -type f -name "Robust.Server" | head -n 1) +if [ -z "$SERVER_PATH" ]; then + echo "No SS14.Watchdog or Robust.Server executable found under /ss14" >&2 exit 1 fi + +SERVER_DIR=$(dirname "$SERVER_PATH") +cd "$SERVER_DIR" || exit 1 +chmod +x "$SERVER_PATH" +exec "$SERVER_PATH" "$@"