Ahenk/debian/postinst

58 lines
1.3 KiB
Text
Raw Normal View History

2016-02-01 17:00:34 +02:00
#!/bin/sh
# postinst script for ahenk
#
# see: dh_installdeb(1)
set -e
case "$1" in
configure)
while true; do
2016-06-20 11:57:40 +03:00
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 ]
then
if [ -f /etc/pam.d/common-session ]
then
2016-08-19 14:36:48 +03:00
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
fi
break;;
2016-06-20 11:57:40 +03:00
[H] ) exit;;
* ) echo "Lütfen e ya da H karakterleri ile yanıtlayın!";;
esac
done
2016-02-01 17:00:34 +02:00
systemctl --system daemon-reload
systemctl enable ahenk.service
update-rc.d ahenk defaults
/etc/init.d/ahenk start
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0