diff --git a/install.sh b/install.sh index ae5ec57..2f31027 100755 --- a/install.sh +++ b/install.sh @@ -29,7 +29,6 @@ copy_files() { cp wmde-rp-generate-known-hosts.sh $PREFIX/ #cp wmde-rp-usersync-nfs.sh $PREFIX/ cp wmde-rp-unison-ssh.sh $PREFIX/ - cp wmde-rp-progress.sh $PREFIX/ cp wmde-rp-common.sh $PREFIX/ cp wmde-rp-osync-ssh.sh $PREFIX/ chmod 755 $PREFIX/* @@ -76,6 +75,26 @@ if [ "$OS" = "DEBIAN" ]; then rm -rf unison_temp copy_files + + FILE="/etc/pam.d/common-session" + LINE="session required pam_exec.so stdout /usr/local/bin/wmde/wmde-rp-init.sh" + FOUND=0 + + # Datei zeilenweise prüfen + while IFS= read -r existing_line; do + if [ "$existing_line" = "$LINE" ]; then + FOUND=1 + break + fi + done < "$FILE" + + if [ "$FOUND" -eq 0 ]; then + echo "$LINE" >> "$FILE" + echo "Zeile hinzugefügt." + else + echo "Zeile ist bereits vorhanden." + fi + fi