diff --git a/assets/update_mirror.sh b/assets/update_mirror.sh index a35e738..a8d8337 100755 --- a/assets/update_mirror.sh +++ b/assets/update_mirror.sh @@ -7,11 +7,6 @@ UBUNTU_RELEASE=trusty UPSTREAM_URL="http://archive.ubuntu.com/ubuntu/" REPOS=( ${UBUNTU_RELEASE} ${UBUNTU_RELEASE}-updates ${UBUNTU_RELEASE}-security ) -# Export the GPG Public key -if [[ ! -f /opt/aptly/aptly_repo_key.pub ]]; then - gpg --export --armor > /opt/aptly/${HOSTNAME}_signing.key -fi - # Create repository mirrors if they don't exist set +e for repo in ${REPOS[@]}; do @@ -58,6 +53,11 @@ else fi set -e +# Export the GPG Public key +if [[ ! -f /opt/aptly/public/aptly_repo_signing.key ]]; then + gpg --export --armor > /opt/aptly/public/aptly_repo_signing.key +fi + # Generate Aptly Graph aptly graph cp `ls -rt /tmp/aptly-graph*.png | tail -n1` /opt/aptly/public/aptly_graph.png