diff --git a/debian/postinst b/debian/postinst index 7bd6f58..f8d9145 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # postinst script for ahenk # # see: dh_installdeb(1) @@ -13,22 +13,10 @@ while true; do read -p "Eğer makinada var olan bir pam konfigurasyonu varsa geçersiz hale gelecektir.Devam etmek istiyor musunuz? [e/H]" eH case $eH in [e] ) - if [ -d /etc/pam.d ] + if [ -d /usr/share/pam-configs ] then - if [ -f /etc/pam.d/common-session ] - then - cp -f /etc/pam.d/common-session /etc/pam.d/common-session.orig - grep -q 'pam_script.so' /etc/pam.d/common-session - if [ $? -eq 0 ] - then - echo "pam_scripst.so zaten mevcut." - else - echo "pam_script.so bulunamadı! /etc/pam.d/common-session dosyasına ekleniyor..." - # Use optional, we don't want access denied if there is a problem: - echo "session optional pam_script.so" >> /etc/pam.d/common-session - echo "pam_script.so eklendi." - fi - fi + echo -e "Name: Support for authentication by external scripts\nDefault: yes\nPriority: 257\nSession-Type: Additional\nSession:\n\toptional\tpam_script.so" > /usr/share/pam-configs/pam_script + DEBIAN_FRONTEND=noninteractive pam-auth-update fi break;; [H] ) exit;; @@ -36,7 +24,6 @@ while true; do esac done - systemctl --system daemon-reload systemctl enable ahenk.service diff --git a/debian/postrm b/debian/postrm deleted file mode 100644 index 811f6f1..0000000 --- a/debian/postrm +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# postrm script for ahenk -# - -if [ -f /etc/pam.d/common-session.orig ]; then - mv -f /etc/pam.d/common-session.orig /etc/pam.d/common-session -fi