summaryrefslogtreecommitdiff
path: root/src/transitions/0.28
blob: d21ec4ebc2a53c0211e35b98eb4de6a573137b70 (plain)
  1. #!/bin/bash
  2. # This is a post-install script for monkeysphere, to transition an old
  3. # (<0.28) setup to the new (>=0.28) setup.
  4. # You should be able to run this script after any version >= 0.23 is
  5. # installed. This script should be well-behaved, even if it is run
  6. # repeatedly.
  7. # Written by
  8. # Jameson Rollins <jrollins@finestructure.net>
  9. # Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  10. #
  11. # Copyright 2010, released under the GPL, version 3 or later
  12. # any unexpected errors should cause this script to bail:
  13. set -e
  14. SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"__SYSSHAREDIR_PREFIX__/share/monkeysphere"}
  15. export SYSSHAREDIR
  16. . "${SYSSHAREDIR}/defaultenv"
  17. OLD_HOST_KEY_FILE="$SYSDATADIR"/ssh_host_rsa_key.pub.gpg
  18. if [ -f "$OLD_HOST_KEY_FILE" ] ; then
  19. monkeysphere-host update-pgp-pub-file
  20. rm -f "$OLD_HOST_KEY_FILE"
  21. fi