summaryrefslogtreecommitdiff
path: root/packaging/debian/monkeysphere.postinst
blob: 6b12ee86a5100dc079728a65f6bff22106661cb2 (plain)
  1. #!/bin/sh
  2. # postinst script for monkeysphere
  3. # Author: Jameson Rollins <jrollins@finestructure.net>
  4. # Copyright 2008-2009
  5. set -e
  6. VARLIB="/var/lib/monkeysphere"
  7. case $1 in
  8. configure)
  9. # add a monkeysphere user if one does not already exist
  10. if ! getent passwd monkeysphere >/dev/null ; then
  11. echo "adding monkeysphere user..."
  12. adduser --quiet --system --no-create-home --group \
  13. --home "$VARLIB" \
  14. --shell '/bin/bash' \
  15. --gecos 'monkeysphere authentication user,,,' \
  16. monkeysphere
  17. fi
  18. # try to transition from to 0.23:
  19. /usr/share/monkeysphere/transitions/0.23
  20. # setup monkeysphere authentication
  21. monkeysphere-authentication setup
  22. ;;
  23. esac
  24. # dh_installdeb will replace this with shell code automatically
  25. # generated by other debhelper scripts.
  26. #DEBHELPER#
  27. exit 0