Devuan fork of gpsd
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.
 
 
 
 
 
 

28 lines
652 B

  1. #!/bin/bash
  2. # postinst script for gpsd
  3. set -e
  4. if [ "$1" = "configure" ] ; then
  5. echo "Creating/updating gpsd user account..."
  6. adduser --system --ingroup dialout --home /run/gpsd \
  7. --gecos "GPSD system user" --shell /bin/false \
  8. --quiet --disabled-password gpsd || {
  9. # adduser failed. Why?
  10. if getent passwd gpsd >/dev/null ; then
  11. echo "Non-system user gpsd found. I will not overwrite a non-system" >&2
  12. echo "user. Remove the user and reinstall gpsd." >&2
  13. exit 1
  14. fi
  15. # unknown adduser error, simply exit
  16. exit 1
  17. }
  18. fi
  19. #DEBHELPER#
  20. exit 0