Skip to content

Commit

Permalink
idaholab#565, allow specifying alternate download location for MaxMin…
Browse files Browse the repository at this point in the history
…d GeoIP database files
  • Loading branch information
mmguero committed Sep 17, 2024
1 parent 5faca03 commit af2ccd9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shared/bin/maxmind-mmdb-download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ WORKDIR="$(mktemp -d -t dlmmdb-XXXXXX)"

# cleanup - on exit ensure the leftover files cleaned up
function cleanup {
popd >/dev/null 2>&1
if ! rm -rf "${WORKDIR}"; then
echo "Failed to remove temporary directory \"${WORKDIR}\"" >&2
exit 1
fi
}

if [[ -d "${WORKDIR}" ]]; then
pushd "${WORKDIR}" >/dev/null 2>&1
trap "cleanup" EXIT

if [[ -n "${MAXMIND_GEOIP_DB_LICENSE_KEY}" ]]; then
Expand Down

0 comments on commit af2ccd9

Please sign in to comment.