From cdb297c003b6b0dcbc7153aa663ebe3bcfd7adee Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 2 Jul 2012 18:16:25 +0200 Subject: Make sure the exported key is owned by reprepro:reprepro. --- templates/reprepro-export-key.sh.erb | 6 ++++-- 1 file 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 -- cgit v1.2.3