Fügt Install-Skripte hinzu.
This commit is contained in:
parent
c010a1d2d5
commit
8e4a86268e
29
Setup/0_Setup.sh
Normal file
29
Setup/0_Setup.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Root-Rechte prüfen
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "Bitte mit sudo ausführen!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apt update && apt upgrade -y
|
||||
apt install -y git sudo
|
||||
|
||||
# Der Code, der eingefügt werden soll
|
||||
CONFIG_BLOCK='if groups | grep -q "\bsudo\b"; then
|
||||
case ":$PATH:" in
|
||||
*":/sbin:"*) ;;
|
||||
*) export PATH="$PATH:/sbin" ;;
|
||||
esac
|
||||
case ":$PATH:" in
|
||||
*":/usr/sbin:"*) ;;
|
||||
*) export PATH="$PATH:/usr/sbin" ;;
|
||||
esac
|
||||
fi'
|
||||
|
||||
# Saubere Lösung über /etc/profile.d/
|
||||
echo "$CONFIG_BLOCK" > /etc/profile.d/custom_path.sh
|
||||
chmod +x /etc/profile.d/custom_path.sh
|
||||
|
||||
echo "Fertig! Bitte neu einloggen oder 'source /etc/profile.d/custom_path.sh' ausführen."
|
||||
|
||||
34
Setup/1_TrixieUpgrade.sh
Normal file
34
Setup/1_TrixieUpgrade.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Root-Rechte prüfen
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "Bitte mit sudo ausführen!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sicherheitsabfrage
|
||||
read -p "Achtung! Du führst ein Release-Upgrade auf Debian Trixie durch. Fortfahren? (ja/nein): " choice
|
||||
if [[ "$choice" != "ja" ]]; then
|
||||
echo "Upgrade abgebrochen."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Aktualisiere Paketlisten..."
|
||||
sudo apt-get update
|
||||
|
||||
echo "Starte System-Upgrade..."
|
||||
sudo apt-get full-upgrade -y
|
||||
|
||||
echo "Ändere die Paketquellen auf Debian Trixie..."
|
||||
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
|
||||
sudo find /etc/apt/sources.list.d -type f -exec sed -i 's/bookworm/trixie/g' {} \;
|
||||
|
||||
echo "Aktualisiere Paketlisten erneut..."
|
||||
sudo apt-get update
|
||||
|
||||
echo "Starte vollständiges Release-Upgrade..."
|
||||
sudo apt-get full-upgrade -y
|
||||
|
||||
echo "System wird jetzt neu gestartet..."
|
||||
sudo reboot
|
||||
|
||||
26
Setup/2_AdJoin.sh
Normal file
26
Setup/2_AdJoin.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Root-Rechte prüfen
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
echo "Bitte nicht als Root ausführen! Das Skript nutzt sudo, falls nötig."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verzeichnis setzen
|
||||
REPO_DIR="$HOME/Linux-Active-Directory-join-script"
|
||||
|
||||
# Repository klonen, falls es noch nicht existiert
|
||||
if [ -d "$REPO_DIR" ]; then
|
||||
echo "Repository existiert bereits. Überspringe das Klonen."
|
||||
else
|
||||
echo "Klonen des Repositories..."
|
||||
git clone https://gitea.creative-dragonslayer.de/DragonSlayer_14/Linux-Active-Directory-join-script.git "$REPO_DIR"
|
||||
fi
|
||||
|
||||
# In das Verzeichnis wechseln
|
||||
cd "$REPO_DIR" || { echo "Fehler: Konnte nicht in das Verzeichnis wechseln!"; exit 1; }
|
||||
|
||||
# AD-Skript ausführen
|
||||
echo "Starte Active Directory Verbindung..."
|
||||
sudo bash ADconnection.sh
|
||||
|
||||
26
Setup/3_HyprlandInstall.sh
Normal file
26
Setup/3_HyprlandInstall.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Repository-Pfad definieren
|
||||
REPO_DIR="$HOME/Debian-Hyprland"
|
||||
|
||||
# Falls das Repository bereits existiert, überspringen
|
||||
if [ -d "$REPO_DIR" ]; then
|
||||
echo "Repository existiert bereits. Aktualisiere stattdessen..."
|
||||
cd "$REPO_DIR" || { echo "Fehler: Konnte nicht in das Verzeichnis wechseln!"; exit 1; }
|
||||
git pull
|
||||
else
|
||||
echo "Klonen des Repositories..."
|
||||
git clone --depth=1 https://github.com/JaKooLit/Debian-Hyprland.git "$REPO_DIR" || { echo "Fehler beim Klonen!"; exit 1; }
|
||||
cd "$REPO_DIR" || { echo "Fehler: Konnte nicht in das Verzeichnis wechseln!"; exit 1; }
|
||||
fi
|
||||
|
||||
# Sicherstellen, dass das Installationsskript existiert und ausführbar ist
|
||||
if [ -f "install.sh" ]; then
|
||||
chmod +x install.sh
|
||||
echo "Starte Installation..."
|
||||
./install.sh
|
||||
else
|
||||
echo "Fehler: install.sh nicht gefunden!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user