BastilleBSD/Ports/switch-to-latest-port.sh hinzugefügt

This commit is contained in:
2025-10-02 22:39:19 +02:00
parent b1a9ac3c58
commit eb427413eb

View File

@@ -0,0 +1,22 @@
#!/bin/sh
# Usage: ./switch-to-latest.sh <jailname>
JAIL="$1"
if [ -z "$JAIL" ]; then
echo "Usage: $0 <jailname>"
exit 1
fi
echo ">>> Switching jail '$JAIL' from quarterly to latest..."
# Suchen & ersetzen in Repo-Dateien (falls quarterly noch drin ist)
bastille cmd "$JAIL" sh -c "sed -i '' 's|quarterly|latest|g' /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf 2>/dev/null || true"
# Repository neu laden
bastille cmd "$JAIL" pkg update -f
# Upgrade der Pakete
#bastille cmd "$JAIL" pkg upgrade -y
echo ">>> Jail '$JAIL' is now using latest repo."