mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 14:22:17 +03:00
49 lines
882 B
Bash
49 lines
882 B
Bash
#!/bin/sh
|
|
# postinst script for ahenk
|
|
#
|
|
# see: dh_installdeb(1)
|
|
|
|
set -e
|
|
|
|
|
|
case "$1" in
|
|
configure)
|
|
|
|
while true; do
|
|
read -p "If any 'pam' configuration exists, it will be gone.Do you want to continue?" yn
|
|
case $yn in
|
|
[Yy]* )
|
|
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;;
|
|
[Nn]* ) exit;;
|
|
* ) echo "Please answer y(yes) or n(no).";;
|
|
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
|