diff options
author | intrigeri <intrigeri@boum.org> | 2012-07-02 18:16:25 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2012-07-02 18:16:25 +0200 |
commit | cdb297c003b6b0dcbc7153aa663ebe3bcfd7adee (patch) | |
tree | c794f19d8f9136f0d7f797e9719d4ce6e616078f /templates | |
parent | 973608ff1999ae385fad392e1344ec57348481be (diff) |
Make sure the exported key is owned by reprepro:reprepro.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/reprepro-export-key.sh.erb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/reprepro-export-key.sh.erb b/templates/reprepro-export-key.sh.erb index e619e24..2b97585 100644 --- a/templates/reprepro-export-key.sh.erb +++ b/templates/reprepro-export-key.sh.erb @@ -4,7 +4,9 @@ KEY="`gpg --homedir <%= basedir %>/.gnupg --with-colon --list-secret-keys | cut if [ ! -z "$KEY" ]; then tempfile=$(mktemp) + destfile=<%= basedir %>/key.asc gpg --homedir <%= basedir %>/.gnupg --export --armor $KEY > "$tempfile" - mv "$tempfile" <%= basedir %>/key.asc - chmod 0664 <%= basedir %>/key.asc + mv "$tempfile" "$destfile" + chown reprepro:reprepro "$destfile" + chmod 0664 "$destfile" fi |