You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smallstep-certificates/examples/docker/renewer/entrypoint.sh

19 lines
423 B
Bash

#!/bin/sh
# Wait for CA
sleep 5
# Clean old certificates
rm -f /var/local/step/root_ca.crt
rm -f /var/local/step/site.crt /var/local/step/site.key
# Download the root certificate
step ca root /var/local/step/root_ca.crt
# Get token
STEP_TOKEN=$(step ca token $COMMON_NAME)
# Download the root certificate
step ca certificate --token $STEP_TOKEN $COMMON_NAME /var/local/step/site.crt /var/local/step/site.key
exec "$@"