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