Repos lokal klonen vor Setup, WireGuard automatisch deployen
- setup.sh klont macbook-setup + dotfiles-rene lokal (Credentials einmalig im interaktiven Terminal statt im Autostart) - setup-base.sh nutzt lokale Dateien wenn vorhanden (wget-Fallback fuer Autoinstall bleibt erhalten), deployed WireGuard-Config - wireguard/ aus .gitignore entfernt, Configs werden getrackt - WireGuard aus manueller Checkliste entfernt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f6e7807d19
commit
4c2fa87209
12 changed files with 164 additions and 26 deletions
|
|
@ -13,6 +13,15 @@ ok() { echo -e "${GREEN}✓ $*${NC}"; }
|
|||
warn() { echo -e "${YELLOW}⚠ $*${NC}"; }
|
||||
fail() { echo -e "${RED}✗ $*${NC}"; }
|
||||
|
||||
# ── Lokales Repo erkennen (falls nicht via curl|bash) ─────────────────
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
||||
if [[ -n "$SCRIPT_DIR" && -f "$SCRIPT_DIR/mbpfan-13.conf" ]]; then
|
||||
REPO_DIR="$SCRIPT_DIR"
|
||||
ok "Lokales Repo erkannt: $REPO_DIR"
|
||||
else
|
||||
REPO_DIR=""
|
||||
fi
|
||||
|
||||
# ── Modell ermitteln ─────────────────────────────────────────────────────
|
||||
if [[ "$1" == "13" || "$1" == "16" ]]; then
|
||||
MODEL="$1"
|
||||
|
|
@ -129,12 +138,33 @@ ok "Brave wird als Flatpak in setup-desktop.sh installiert"
|
|||
echo -e "\n=== 7/11 Systemkonfigurationen ==="
|
||||
|
||||
# mbpfan (modellabhängig)
|
||||
wget -q -O /tmp/mbpfan.conf "$SETUP_RAW/mbpfan-${MODEL}.conf" && \
|
||||
cp /tmp/mbpfan.conf /etc/mbpfan.conf || warn "mbpfan.conf Download fehlgeschlagen"
|
||||
if [[ -n "$REPO_DIR" && -f "$REPO_DIR/mbpfan-${MODEL}.conf" ]]; then
|
||||
cp "$REPO_DIR/mbpfan-${MODEL}.conf" /etc/mbpfan.conf
|
||||
ok "mbpfan.conf (lokal)"
|
||||
else
|
||||
wget -q -O /etc/mbpfan.conf "$SETUP_RAW/mbpfan-${MODEL}.conf" || warn "mbpfan.conf Download fehlgeschlagen"
|
||||
fi
|
||||
|
||||
# Temperatur-Watch-Skript
|
||||
wget -q -O /usr/local/bin/temp-watch.sh "$SETUP_RAW/temp-watch.sh" && \
|
||||
chmod +x /usr/local/bin/temp-watch.sh || warn "temp-watch.sh Download fehlgeschlagen"
|
||||
if [[ -n "$REPO_DIR" && -f "$REPO_DIR/temp-watch.sh" ]]; then
|
||||
cp "$REPO_DIR/temp-watch.sh" /usr/local/bin/temp-watch.sh
|
||||
chmod +x /usr/local/bin/temp-watch.sh
|
||||
ok "temp-watch.sh (lokal)"
|
||||
else
|
||||
wget -q -O /usr/local/bin/temp-watch.sh "$SETUP_RAW/temp-watch.sh" && \
|
||||
chmod +x /usr/local/bin/temp-watch.sh || warn "temp-watch.sh Download fehlgeschlagen"
|
||||
fi
|
||||
|
||||
# WireGuard-Config
|
||||
if [[ -n "$REPO_DIR" && -f "$REPO_DIR/wireguard/m${MODEL}.conf" ]]; then
|
||||
mkdir -p /etc/wireguard
|
||||
cp "$REPO_DIR/wireguard/m${MODEL}.conf" /etc/wireguard/wg0.conf
|
||||
chmod 600 /etc/wireguard/wg0.conf
|
||||
systemctl enable wg-quick@wg0 2>/dev/null || true
|
||||
ok "WireGuard m${MODEL}.conf → /etc/wireguard/wg0.conf"
|
||||
else
|
||||
warn "WireGuard: keine lokale Config gefunden — manuell einrichten"
|
||||
fi
|
||||
|
||||
ok "Systemkonfigurationen gesetzt"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue