mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 18:19:33 +00:00
For now, the images are still built on the target machine for testing, in the end they need to be built in a GitHub action.
15 lines
347 B
Bash
Executable File
15 lines
347 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
RENEW=30
|
|
TODAY=`date '+%Y_%m_%d'`
|
|
|
|
echo "Running cron-$(basename $0) for ${TODAY}..."
|
|
|
|
if ! expires=`openssl x509 -checkend $[ 86400 * $RENEW ] -noout -in /etc/nginx/ssl/labca_cert.pem`; then
|
|
echo " renewing!"
|
|
cp -p /etc/nginx/ssl/labca_cert.pem /etc/nginx/ssl/labca_cert_$TODAY.pem
|
|
/opt/labca/renew
|
|
fi
|