cronjob config for syncing CRLs

This commit is contained in:
dandds
2018-10-23 13:43:32 -04:00
parent 9fe7d877ba
commit e17edf1f39
2 changed files with 14 additions and 5 deletions

View File

@@ -4,11 +4,17 @@
set -e
cd "$(dirname "$0")/.."
mkdir -p crl-tmp
pipenv run python ./atst/domain/authnid/crl/util.py crl-tmp crl
if [[ $# -eq 0 ]]; then
TMP_DIR=crl-tmp
else
TMP_DIR=$1
fi
mkdir -p $TMP_DIR
pipenv run python ./atst/domain/authnid/crl/util.py $TMP_DIR crl
mkdir -p crl
rsync -rq --min-size 400 crl-tmp/. crl/.
rm -rf crl-tmp
rsync -rq --min-size 400 $TMP_DIR/. crl/.
rm -rf $TMP_DIR
if [[ $FLASK_ENV != "prod" ]]; then
# place our test CRL there