docs: 0.1.4 auf srv04 als Dienst eingespielt und geprüft (#1044); install.sh zeigt bei Updates keine Schritte für Neuinstallation mehr

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 14:04:56 +01:00
parent ed5ba7a1b7
commit 52d6c5642f
6 changed files with 46 additions and 9 deletions

View File

@ -53,7 +53,9 @@ VERSION="${VERSION:?VERSION fehlt (zum Beispiel VERSION=0.1.3)}"
install -d -o "$USER_NAME" -g "$USER_NAME" -m 0755 "$BASE" "$BASE/releases" "$BASE/releases/$VERSION"
install -d -o "$USER_NAME" -g "$USER_NAME" -m 0750 "$BASE/data"
install -o "$USER_NAME" -g "$USER_NAME" -m 0755 "$HERE/nexus" "$BASE/releases/$VERSION/nexus"
fresh=1
if [ -f "$BASE/data/nexus.db" ] && [ -f "$BASE/config.toml" ]; then
fresh=0
# Mit dem neuen Binary, das die Datenbank dabei nur liest (keine Migration).
backup="$BASE/data/backups/nexus-vor-$VERSION-$(date -u +%Y%m%dT%H%M%SZ).db"
as_user "$BASE/releases/$VERSION/nexus" backup --out "$backup" --config "$BASE/config.toml"
@ -117,7 +119,17 @@ for arg in "$@"; do
done
echo
echo "Nächste Schritte (als $USER_NAME):"
echo " sudo -u $USER_NAME $BASE/current/nexus model add --name bonsai --path /srv/models/gguf/Bonsai-1.7B-Q1_0.gguf --gpus 0 --config $BASE/config.toml"
echo " sudo -u $USER_NAME $BASE/current/nexus key create --name test --config $BASE/config.toml"
echo " sudo systemctl start nexus && journalctl -u nexus -f"
if [ "$fresh" -eq 1 ]; then
# Neue Installation: noch keine Modelle und Keys.
echo "Nächste Schritte (als $USER_NAME):"
echo " sudo -u $USER_NAME $BASE/current/nexus model add --name bonsai --path /srv/models/gguf/Bonsai-1.7B-Q1_0.gguf --gpus 0 --config $BASE/config.toml"
echo " sudo -u $USER_NAME $BASE/current/nexus key create --name test --config $BASE/config.toml"
echo " sudo systemctl start nexus && journalctl -u nexus -f"
else
# Update: Modelle und Keys bleiben, nichts neu anlegen.
echo "Update: Datenbank, Modelle und Keys bleiben erhalten (Sicherung siehe oben)."
case " $* " in
*" --start "*) ;;
*) echo "Die neue Version läuft erst nach: sudo systemctl restart nexus" ;;
esac
fi