summarylogtreecommitdiffstats
path: root/iris.install
blob: d8647928e4b4c7c092a5ac7d1bf8daa5e1d28c76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
post_install() {
  echo ""
  echo "==> IRIS — Infrared Recognition & Identity System installed"
  echo ""
  echo "  Quick start:"
  echo ""
  echo "  1. Configure IRIS:"
  echo "     mkdir -p ~/.config/iris"
  echo "     cp /usr/share/iris/config.example.ini ~/.config/iris/config.ini"
  echo "     # Edit ~/.config/iris/config.ini if needed"
  echo ""
  echo "  2. Enroll your face:"
  echo "     iris-enroll --force"
  echo ""
  echo "  3. Test authentication:"
  echo "     iris-auth --timeout 10"
  echo ""
  echo "  4. (Optional) Integrate with SDDM lock screen:"
  echo "     sudo /usr/share/iris/scripts/install-pam.sh"
  echo ""
  echo "  Failsafe:"
  echo "    Emergency disable:  iris-disable"
  echo "    Re-enable:          iris-enable"
  echo "    Restore PAM backup: sudo cp /etc/pam.d/sddm.backup /etc/pam.d/sddm"
  echo ""
  echo "  Docs: /usr/share/iris/docs/"
  echo ""
}

post_upgrade() {
  post_install
}

pre_remove() {
  if grep -q "pam_exec.so.*face_auth.sh" /etc/pam.d/sddm 2>/dev/null; then
    echo "WARNING: IRIS PAM integration is still active in /etc/pam.d/sddm"
    echo "  Remove the IRIS line before uninstalling:"
    echo "  sudo sed -i '\|pam_exec.so.*face_auth.sh|d' /etc/pam.d/sddm"
  fi
}