You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
820 B

  1. #!/bin/sh
  2. # preinst script for trackomatron
  3. #
  4. set -e
  5. # summary of how this script can be called:
  6. # * <new-preinst> `install'
  7. # * <new-preinst> `install' <old-version>
  8. # * <new-preinst> `upgrade' <old-version>
  9. # * <old-preinst> `abort-upgrade' <new-version>
  10. # for details, see https://www.debian.org/doc/debian-policy/ or
  11. # the debian-policy package
  12. case "$1" in
  13. install|upgrade)
  14. if ! grep -q '^trackomatron:' /etc/passwd ; then
  15. useradd -k /dev/null -r -m -b /etc trackomatron
  16. chmod 755 /etc/trackomatron
  17. fi
  18. ;;
  19. abort-upgrade)
  20. ;;
  21. *)
  22. echo "preinst called with unknown argument \`$1'" >&2
  23. exit 1
  24. ;;
  25. esac
  26. # dh_installdeb will replace this with shell code automatically
  27. # generated by other debhelper scripts.
  28. #DEBHELPER#
  29. exit 0