Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Läuft AUF srv04 als Benutzer stephan (ohne sudo). Testinstanz für die Kernprüfung (#1263).
|
||||
# Aufruf: bash remote.sh prepare|start|stop|clean
|
||||
# Aufruf: bash remote.sh prepare|start|sched|stop|clean
|
||||
# Alles liegt unter /tmp/nexus-kern (tmpfs). Die Produktion (nexus.service, Port 8080) wird nicht angefasst.
|
||||
set -u
|
||||
DIR=/tmp/nexus-kern
|
||||
@ -35,6 +35,17 @@ start)
|
||||
echo $! > "$DIR/nexus.pid"
|
||||
curl -s --retry 10 --retry-delay 1 --retry-connrefused http://127.0.0.1:18100/gateway/v1/health; echo
|
||||
;;
|
||||
sched)
|
||||
# Neue [scheduler]-Werte: remote.sh sched "idle_secs = 600" "max_waiting = 4" (Instanz vorher stoppen)
|
||||
shift
|
||||
python3 -I - "$CFG" "$@" <<'PY'
|
||||
import re, sys
|
||||
p, lines = sys.argv[1], sys.argv[2:]
|
||||
s = open(p).read()
|
||||
s = re.sub(r"(?s)\[scheduler\]\n.*?\n\n", "[scheduler]\n" + "\n".join(lines) + "\n\n", s, count=1)
|
||||
open(p, "w").write(s)
|
||||
PY
|
||||
;;
|
||||
stop)
|
||||
[ -f "$DIR/nexus.pid" ] && kill "$(cat "$DIR/nexus.pid")" 2>/dev/null; rm -f "$DIR/nexus.pid"
|
||||
;;
|
||||
@ -42,5 +53,5 @@ clean)
|
||||
[ -f "$DIR/nexus.pid" ] && { echo "erst stop"; exit 1; }
|
||||
rm -rf "$DIR"
|
||||
;;
|
||||
*) echo "Aufruf: remote.sh prepare|start|stop|clean"; exit 2 ;;
|
||||
*) echo "Aufruf: remote.sh prepare|start|sched|stop|clean"; exit 2 ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user