mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 15:32:19 +03:00
update ahenk deb inst & rm scripts
This commit is contained in:
parent
a44e7c3ea0
commit
616a6c4376
3 changed files with 15 additions and 5 deletions
14
debian/postinst
vendored
14
debian/postinst
vendored
|
@ -17,9 +17,17 @@ while true; do
|
||||||
then
|
then
|
||||||
if [ -f /etc/pam.d/common-session ]
|
if [ -f /etc/pam.d/common-session ]
|
||||||
then
|
then
|
||||||
cp /etc/pam.d/common-session /etc/pam.d/common-session.orig
|
cp -f /etc/pam.d/common-session /etc/pam.d/common-session.orig
|
||||||
sed -i '/pam_script.so/d' /etc/pam.d/common-session
|
grep -q 'pam_script.so' /etc/pam.d/common-session
|
||||||
echo "session required 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
|
||||||
fi
|
fi
|
||||||
break;;
|
break;;
|
||||||
|
|
5
debian/postrm
vendored
5
debian/postrm
vendored
|
@ -2,5 +2,6 @@
|
||||||
# postrm script for ahenk
|
# postrm script for ahenk
|
||||||
#
|
#
|
||||||
|
|
||||||
cp /etc/pam.d/common-session /etc/pam.d/common-session.before_remove_ahenk
|
if [ -f /etc/pam.d/common-session.orig ]; then
|
||||||
cp /etc/pam.d/common-session.orig /etc/pam.d/common-session
|
mv -f /etc/pam.d/common-session.orig /etc/pam.d/common-session
|
||||||
|
fi
|
||||||
|
|
1
debian/prerm
vendored
1
debian/prerm
vendored
|
@ -3,3 +3,4 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
find /opt/ahenk | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
find /opt/ahenk | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
||||||
|
rm -f /etc/ahenk/ahenk.db
|
||||||
|
|
Loading…
Reference in a new issue