Installer create pam entry on ubuntu/debian
This commit is contained in:
parent
690e84af24
commit
71b7352d7a
21
install.sh
21
install.sh
|
@ -29,7 +29,6 @@ copy_files() {
|
||||||
cp wmde-rp-generate-known-hosts.sh $PREFIX/
|
cp wmde-rp-generate-known-hosts.sh $PREFIX/
|
||||||
#cp wmde-rp-usersync-nfs.sh $PREFIX/
|
#cp wmde-rp-usersync-nfs.sh $PREFIX/
|
||||||
cp wmde-rp-unison-ssh.sh $PREFIX/
|
cp wmde-rp-unison-ssh.sh $PREFIX/
|
||||||
cp wmde-rp-progress.sh $PREFIX/
|
|
||||||
cp wmde-rp-common.sh $PREFIX/
|
cp wmde-rp-common.sh $PREFIX/
|
||||||
cp wmde-rp-osync-ssh.sh $PREFIX/
|
cp wmde-rp-osync-ssh.sh $PREFIX/
|
||||||
chmod 755 $PREFIX/*
|
chmod 755 $PREFIX/*
|
||||||
|
@ -76,6 +75,26 @@ if [ "$OS" = "DEBIAN" ]; then
|
||||||
rm -rf unison_temp
|
rm -rf unison_temp
|
||||||
|
|
||||||
copy_files
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue