trust-store-generators/main.sh

53 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
# Run all scripts.
set -o errexit # (-e) exit immediately if any command has a non-zero exit status
# Check if dependencies are installed.
if ! command -v openssl >/dev/null; then
>&2 echo '"openssl" not installed! [required]'
exit 1
fi
if ! command -v idn >/dev/null; then
>&2 echo '"idn" not installed! [required]'
exit 1
fi
if ! command -v agunua >/dev/null; then
>&2 echo '"agunua" not installed! [required]'
exit 1
fi
if ! command -v torsocks >/dev/null; then
>&2 echo '"torsocks" not installed! [optional]'
fi
# Go where this script is.
cd "$(dirname "$0")" || exit
echo "Start -> $(date --utc)"
echo '=== get hosts ==='
./get-hosts.sh
echo '=== get certs ==='
if command -v torsocks >/dev/null; then
./get-certs.sh tor
else
./get-certs.sh
fi
echo '=== prune old certs ==='
./prune-old-certs.sh
echo '=== cert details ==='
./cert-details.sh
echo '=== Agunua ==='
agunua/generate-trust-store.sh
echo '=== Amfora ==='
amfora/generate-trust-store.sh
echo '=== Lagrange ==='
lagrange/generate-trust-store.sh
echo "End -> $(date --utc)"