blob: c11a5308ffe5a00ed8a34688d48fe9ef53e0e555 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/bash
#
# This file is managed by Puppet. Do not edit, any changes will be overwritten!
#
KEY="$(gpg --homedir <%= @basedir %>/.gnupg --with-colon --list-secret-keys | cut -d : -f 5 | head -n 1)"
if [ -n "$KEY" ]; then
tempfile=$(mktemp)
destfile=<%= @basedir %>/key.asc
gpg --homedir <%= @basedir %>/.gnupg --export --armor $KEY > "$tempfile"
mv "$tempfile" "$destfile"
chown reprepro:reprepro "$destfile"
chmod 0664 "$destfile"
fi
|