update ahenk deb inst & rm scripts

This commit is contained in:
emrekgn 2016-08-19 14:36:48 +03:00
parent a44e7c3ea0
commit 616a6c4376
3 changed files with 15 additions and 5 deletions

14
debian/postinst vendored
View file

@ -17,9 +17,17 @@ while true; do
then
if [ -f /etc/pam.d/common-session ]
then
cp /etc/pam.d/common-session /etc/pam.d/common-session.orig
sed -i '/pam_script.so/d' /etc/pam.d/common-session
echo "session required pam_script.so" >> /etc/pam.d/common-session
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;;

5
debian/postrm vendored
View file

@ -2,5 +2,6 @@
# postrm script for ahenk
#
cp /etc/pam.d/common-session /etc/pam.d/common-session.before_remove_ahenk
cp /etc/pam.d/common-session.orig /etc/pam.d/common-session
if [ -f /etc/pam.d/common-session.orig ]; then
mv -f /etc/pam.d/common-session.orig /etc/pam.d/common-session
fi

1
debian/prerm vendored
View file

@ -3,3 +3,4 @@
#
find /opt/ahenk | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
rm -f /etc/ahenk/ahenk.db