The Kubernetes CronJob for syncing CRLs syncs them to a temporary folder and then copies them to the real location once the sync is complete. If the temporary folder is empty, the `cp` command throws an error. This updates the bash script that manages the sync so that it will skip the copy command if the temporary location is empty.
13 lines
287 B
Bash
Executable File
13 lines
287 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# script/sync-crls: update the DOD CRLs and place them where authnid expects them
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
|
|
mkdir -p crl-tmp crls
|
|
./.venv/bin/python ./atst/domain/authnid/crl/util.py crl-tmp crls
|
|
if [ "$(ls -A crl-tmp)" ]; then
|
|
cp -r crl-tmp/* crls/
|
|
fi
|
|
rm -rf crl-tmp
|