diff options
author | Jameson Rollins <jrollins@finestructure.net> | 2010-01-18 22:59:26 -0500 |
---|---|---|
committer | Jameson Rollins <jrollins@finestructure.net> | 2010-01-18 22:59:26 -0500 |
commit | 8324815dbc0d10791906ea355847803c1bf043fb (patch) | |
tree | 78b3b0588cd8450bb5b8d627e64e4d944f7fedfc /src | |
parent | 7dbd6806e538ff8732dd87fcf20bfd8271464552 (diff) |
add 0.28 transition script to generate new host_keys.pub.pgp file, and remove all ssh_host_rsa_key.pub.gpg file
Diffstat (limited to 'src')
-rwxr-xr-x | src/transitions/0.28 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/transitions/0.28 b/src/transitions/0.28 new file mode 100755 index 0000000..675f4f9 --- /dev/null +++ b/src/transitions/0.28 @@ -0,0 +1,25 @@ +#!/bin/bash + +# This is a post-install script for monkeysphere, to transition an old +# (<0.28) setup to the new (>=0.28) setup. + +# You should be able to run this script after any version >= 0.23 is +# installed. This script should be well-behaved, even if it is run +# repeatedly. + +# Written by +# Jameson Rollins <jrollins@finestructure.net> +# Daniel Kahn Gillmor <dkg@fifthhorseman.net> +# +# Copyright 2010, released under the GPL, version 3 or later + +# any unexpected errors should cause this script to bail: +set -e + +SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"} + +OLD_HOST_KEY_FILE="$SYSDATADIR"/ssh_host_rsa_key.pub.gpg +if [ -f "$OLD_HOST_KEY_FILE" ] ; then + monkeysphere-host update-pgp-pub-file + rm -rf "$OLD_HOST_KEY_FILE" +fi |