install_newt.sh aktualisiert

This commit is contained in:
2025-08-05 23:21:33 +02:00
parent 038e2d2213
commit cc431365b0

View File

@@ -44,12 +44,14 @@ download_newt() {
url="https://github.com/${REPO}/releases/download/${version}/${file}"
target="${INSTALL_DIR}/newt_${version}"
temp_target="${target}.tmp"
mkdir -p "$INSTALL_DIR"
info "⬇️ Lade $url herunter …"
curl -fsSL "$url" -o "$target" || { error "Download fehlgeschlagen."; exit 1; }
curl -fsSL "$url" -o "$temp_target" || { error "Download fehlgeschlagen."; rm -f "$temp_target"; exit 1; }
chmod +x "$target"
chmod +x "$temp_target"
mv "$temp_target" "$target"
ln -sf "$target" "$SYMLINK"
info "✅ newt ${version} installiert als ${target}"
}
@@ -137,7 +139,6 @@ perform_reinstall() {
info "📦 Neueste Version: ${version}"
download_newt "$version"
cleanup_old_versions
sudo systemctl stop "$SERVICE_NAME" || true
sudo rm -f "$SERVICE_FILE" || true
setup_systemd_service
info "🚀 Reinstallation abgeschlossen!"
@@ -159,4 +160,4 @@ main() {
esac
}
main "$@"
main "$@"