summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/reprepro-export-key.sh.erb6
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