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