mirror of
https://github.com/smallstep/certificates.git
synced 2024-11-17 15:29:21 +00:00
0d4f96c1d9
Clean old certificates in volumes on start.
18 lines
422 B
Bash
Executable File
18 lines
422 B
Bash
Executable File
#!/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
|
|
|
|
# Donwload the root certificate
|
|
step ca root /var/local/step/root_ca.crt
|
|
|
|
# Get token
|
|
STEP_TOKEN=$(step ca token $COMMON_NAME)
|
|
# Donwload the root certificate
|
|
step ca certificate --token $STEP_TOKEN $COMMON_NAME /var/local/step/site.crt /var/local/step/site.key
|
|
|
|
exec "$@" |