Files
yourdev-session-pki/debian-pkg/yourdev-session-pki_1.0_all/DEBIAN/prerm
Tallagrand Thierry bf6976db2e first commit
2026-05-15 16:34:37 +02:00

32 lines
633 B
Bash
Executable File

#!/bin/sh
set -e
case "$1" in
remove|purge)
# Disable our pam-auth-update profile
if command -v pam-auth-update >/dev/null 2>&1; then
pam-auth-update --package --remove yourdev-smartcard 2>/dev/null || true
fi
# Recompile dconf after removing our override
if command -v dconf >/dev/null 2>&1; then
dconf update 2>/dev/null || true
fi
# Restart SSSD
if command -v systemctl >/dev/null 2>&1; then
systemctl restart sssd 2>/dev/null || true
fi
;;
upgrade|failed-upgrade)
;;
*)
echo "prerm called with unknown argument '$1'" >&2
exit 1
;;
esac
exit 0