Ahenk/debian/postinst

50 lines
934 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# postinst script for ahenk
#
# see: dh_installdeb(1)
set -e
case "$1" in
configure)
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 ]
then
if [ -f /etc/pam.d/common-session ]
then
sed -i '/pam_script.so/d' /etc/pam.d/common-session
echo "session required pam_script.so" >> /etc/pam.d/common-session
fi
fi
break;;
[H] ) exit;;
* ) echo "Lütfen e ya da H karakterleri ile yanıtlayın!";;
esac
done
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