Update Linux/SSH/colorscheme.sh

This commit is contained in:
2025-05-06 11:42:16 +00:00
parent 8a8fda1e1e
commit 8eb274257c

View File

@@ -17,7 +17,7 @@ is_rhel() {
# --- 1) Bash-Teil: nur auf Alpine ---
if is_alpine; then
echo "Alpine Linux erkannt führe BashInstallation/-Konfig durch."
echo "Alpine Linux erkannt - führe Bash-Installation/-Konfig durch."
# Bash installieren, falls nicht vorhanden
if ! command -v bash >/dev/null 2>&1; then
@@ -35,7 +35,7 @@ if is_alpine; then
fi
# DefaultShell aller User (UID≥1000 und root) auf /bin/bash setzen
echo " → Setze DefaultShell auf /bin/bash für alle User:"
echo " → Setze Default-Shell auf /bin/bash für alle User:"
while IFS=: read -r user pass uid gid home shell; do
if [ "$uid" -ge 1000 ] || [ "$uid" -eq 0 ]; then
if [ "$shell" != "/bin/bash" ]; then
@@ -65,13 +65,13 @@ if is_alpine; then
update_bashrc "/root"
for d in /home/*; do [ -d "$d" ] && update_bashrc "$d"; done
echo "BashTeil auf Alpine abgeschlossen."
echo "Bash-Teil auf Alpine abgeschlossen."
else
echo "Kein Alpine BashTeil übersprungen."
echo "Kein Alpine - Bash-Teil übersprungen."
fi
# --- 2) Nano + SyntaxHighlighting für alle Distros ---
echo "Installiere/configuriere Nano + SyntaxHighlighting…"
echo "Installiere/configuriere Nano + Syntax-Highlighting…"
if is_alpine; then
apk update
@@ -89,7 +89,7 @@ elif is_rhel; then
fi
yum install -y nano nano-syntax-highlighting
else
echo "Unbekannte Distribution versuche, Nano zu installieren…"
echo "Unbekannte Distribution - versuche, Nano zu installieren…"
# Fallback: gängige Paketmanager testen
if command -v apt >/dev/null; then
apt update && apt install -y nano
@@ -105,9 +105,9 @@ NANORC=/etc/nanorc
INCLUDE='include "/usr/share/nano/*.nanorc"'
if ! grep -Fxq "$INCLUDE" $NANORC; then
echo "$INCLUDE" >> $NANORC
echo " → Nano: SyntaxHighlighting in $NANORC aktiviert."
echo " → Nano: Syntax-Highlighting in $NANORC aktiviert."
else
echo " → Nano: SyntaxHighlighting bereits aktiviert."
echo " → Nano: Syntax-Highlighting bereits aktiviert."
fi
echo "Skript fertig."