2 # This should be sourced by bash (though we welcome changes to make it POSIX sh compliant)
4 # Monkeysphere host set-expire subcommand
6 # This is a function to set the expiration date of the monkeysphere
9 # The monkeysphere scripts are written by:
10 # Jameson Rollins <jrollins@finestructure.net>
11 # Jamie McClelland <jm@mayfirst.org>
12 # Daniel Kahn Gillmor <dkg@fifthhorseman.net>
14 # They are Copyright 2008-2009, and are all released under the GPL,
21 # get the new expiration date
22 extendTo=$(get_gpg_expiration "$1")
24 if [ "$PROMPT" = "true" ] ; then
25 read -p "Are you sure you want to change the expiration on the host key to '$extendTo'? (y/N) " OK; OK=${OK:-N}
26 if [ "${OK/y/Y}" != 'Y' ] ; then
27 failure "expiration not set."
30 log debug "extending without prompting."
33 log info "setting host key expiration to ${extendTo}:"
35 log debug "executing host expire script..."
36 gpg_host_edit expire <<EOF
44 NOTE: Host key expiration date adjusted, but not yet published.
45 Run '$PGRM publish-key' to publish the new expiration date.