# -*-shell-script-*- # This should be sourced by bash (though we welcome changes to make it POSIX sh compliant) # Monkeysphere authentication setup subcommand # # The monkeysphere scripts are written by: # Jameson Rollins # Jamie McClelland # Daniel Kahn Gillmor # # They are Copyright 2009, and are all released under the GPL, # version 3 or later. setup() { # make all needed directories mkdir -p "${MADATADIR}" mkdir -p "${MATMPDIR}" mkdir -p "${GNUPGHOME_CORE}" chmod 700 "${GNUPGHOME_CORE}" mkdir -p "${GNUPGHOME_SPHERE}" chmod 700 "${GNUPGHOME_SPHERE}" mkdir -p "${MADATADIR}"/authorized_keys # deliberately replace the config files via truncation # FIXME: should we be dumping to tmp files and then moving atomically? log debug "writing core gpg.conf..." cat >"${GNUPGHOME_CORE}"/gpg.conf <"${GNUPGHOME_SPHERE}"/gpg.conf <