uninstall.sh 661 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # Remove the phase-1 fprintd shim unit; the packaged fprintd daemon is
  3. # D-Bus activated again on demand.
  4. set -euo pipefail
  5. SELF_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  6. UNIT=/etc/systemd/system/fprintd.service
  7. if [ "$(id -u)" != "0" ]; then
  8. echo "uninstall.sh: run as root (sudo $0)" >&2
  9. exit 1
  10. fi
  11. systemctl stop fprintd 2>/dev/null || true
  12. if [ -f "$UNIT" ]; then
  13. rm -f "$UNIT"
  14. echo "removed $UNIT"
  15. else
  16. echo "no local unit at $UNIT (nothing to do)"
  17. fi
  18. systemctl daemon-reload
  19. systemctl reset-failed fprintd 2>/dev/null || true
  20. echo "Done. fprintd-list will show 'No devices available' again until reinstalled."