From f3f82c9e93385c20db2aa3d69c4b5485fde987a1 Mon Sep 17 00:00:00 2001 From: wlkns-dev Date: Fri, 27 Nov 2026 09:53:51 +0100 Subject: [PATCH] =?UTF-8?q?test:=20Vorlage=20der=20Einheit=20umbenannt=20(?= =?UTF-8?q?=C3=BCberschrieb=20sich=20selbst),=20prepare=20wiederholbar=20(?= =?UTF-8?q?#1198)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- scripts/srv04-leitstand-test/deploy.sh | 2 +- ...exus-test-studio.service => nexus-test-studio.service.in} | 0 scripts/srv04-leitstand-test/remote.sh | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) rename scripts/srv04-leitstand-test/{nexus-test-studio.service => nexus-test-studio.service.in} (100%) diff --git a/scripts/srv04-leitstand-test/deploy.sh b/scripts/srv04-leitstand-test/deploy.sh index 05998d0..f9cfef9 100755 --- a/scripts/srv04-leitstand-test/deploy.sh +++ b/scripts/srv04-leitstand-test/deploy.sh @@ -9,6 +9,6 @@ BIN="$HIER/../../target/x86_64-unknown-linux-musl/release/nexus" # Ein noch laufendes Testbinary blockiert scp: vorher beenden. ssh "$HOST" 'bash /tmp/nexus-test-0126/remote.sh stop >/dev/null 2>&1 || true; mkdir -p /tmp/nexus-test-0126/bin' scp -q "$BIN" "$HOST:/tmp/nexus-test-0126/bin/nexus" -scp -q "$HIER/remote.sh" "$HIER/fake_studio.py" "$HIER/nexus-test-studio.service" "$HIER/config.toml.in" "$HOST:/tmp/nexus-test-0126/" +scp -q "$HIER/remote.sh" "$HIER/fake_studio.py" "$HIER/nexus-test-studio.service.in" "$HIER/config.toml.in" "$HOST:/tmp/nexus-test-0126/" ssh "$HOST" 'chmod +x /tmp/nexus-test-0126/bin/nexus /tmp/nexus-test-0126/remote.sh /tmp/nexus-test-0126/fake_studio.py; /tmp/nexus-test-0126/bin/nexus version; bash /tmp/nexus-test-0126/remote.sh prepare' echo "Fertig. Starten: ssh $HOST 'bash /tmp/nexus-test-0126/remote.sh start'" diff --git a/scripts/srv04-leitstand-test/nexus-test-studio.service b/scripts/srv04-leitstand-test/nexus-test-studio.service.in similarity index 100% rename from scripts/srv04-leitstand-test/nexus-test-studio.service rename to scripts/srv04-leitstand-test/nexus-test-studio.service.in diff --git a/scripts/srv04-leitstand-test/remote.sh b/scripts/srv04-leitstand-test/remote.sh index 7b7fe43..6aa1429 100755 --- a/scripts/srv04-leitstand-test/remote.sh +++ b/scripts/srv04-leitstand-test/remote.sh @@ -17,11 +17,12 @@ prepare) [ -x "$N" ] || { echo "Binary fehlt: $N"; exit 1; } mkdir -p "$DIR/data" sed -e "s|@DIR@|$DIR|g" -e "s|@NEXUS_PORT@|$NEXUS_PORT|g" -e "s|@STUDIO_PORT@|$STUDIO_PORT|g" "$DIR/config.toml.in" > "$CFG" - sed -e "s|@DIR@|$DIR|g" -e "s|@PORT@|$STUDIO_PORT|g" "$DIR/nexus-test-studio.service" > "$DIR/$UNIT" + sed -e "s|@DIR@|$DIR|g" -e "s|@PORT@|$STUDIO_PORT|g" "$DIR/nexus-test-studio.service.in" > "$DIR/$UNIT" + [ -s "$DIR/$UNIT" ] || { echo "Einheit ist leer: $DIR/$UNIT"; exit 1; } systemctl --user link "$DIR/$UNIT" && systemctl --user daemon-reload "$N" selftest --config "$CFG" | tail -2 # Modelle: Bonsai (klein) auf GPU 0 mit kleinem Kontext, freigegeben - "$N" model add --name bonsai --path /srv/models/gguf/Bonsai-1.7B-Q1_0.gguf --gpus 0 --context 2048 --config "$CFG" | tail -1 + "$N" model list --config "$CFG" 2>/dev/null | grep -q '^bonsai' || "$N" model add --name bonsai --path /srv/models/gguf/Bonsai-1.7B-Q1_0.gguf --gpus 0 --context 2048 --config "$CFG" | tail -1 "$N" model enable --name bonsai --config "$CFG" | tail -1 # Benutzer für die Oberfläche: Passwort nur in eine Datei (0600), nie in die Ausgabe if ! "$N" user list --config "$CFG" 2>/dev/null | grep -q '^testadmin'; then