trust-store-generators/main.sh

58 lines
1.2 KiB
Bash
Raw Permalink Normal View History

2021-04-28 09:20:18 +00:00
#!/bin/sh
# Run all scripts.
set -o errexit # (-e) exit immediately if any command has a non-zero exit status
timestamp_start=$(date +%s)
2022-08-07 00:00:00 +00:00
# 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! [required]'
exit 1
2022-08-07 00:00:00 +00:00
fi
2021-04-28 09:20:18 +00:00
# Go where this script is.
cd "$(dirname "$0")" || exit
2021-04-29 16:08:57 +00:00
echo "Start -> $(date --utc)"
2021-04-28 09:20:18 +00:00
echo '=== get hosts ==='
./get-hosts.sh
echo '=== get certs ==='
./get-certs.sh tor
2021-04-28 09:20:18 +00:00
echo '=== prune old certs ==='
./prune-old-certs.sh
2021-04-28 09:20:18 +00:00
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
2021-04-29 16:08:57 +00:00
echo "End -> $(date --utc)"
timestamp_end=$(date +%s)
exec_time="$((timestamp_end - timestamp_start))"
exec_time_formatted="$(date -d "@$exec_time" --utc "+%H:%M:%S")"
echo "Total duration: $exec_time_formatted"