docker-dehydrated/root/etc/s6.d/dehydrated/run

19 lines
560 B
Plaintext
Raw Normal View History

#!/bin/bash
2017-07-12 01:57:57 +00:00
s6-svc -O /etc/s6.d/dehydrated
# If config generation is turned on, generate a config from the template and current env vars
if [[ "$DEHYDRATED_GENERATE_CONFIG" == "yes" ]]; then
j2 /etc/dehydrated/config.j2 > /data/config
fi
# Set ownership to dehydrated on the relevant folders
chown -R ${UID}:${GID} /data
# Register to the CA
if [[ "$DEHYDRATED_ACCEPT_TERMS" == "yes" ]]; then
su-exec ${UID}:${GID} /opt/dehydrated/dehydrated --config /data/config --register --accept-terms
fi
# Run the weekly script once
2017-07-12 01:57:57 +00:00
/etc/periodic/weekly/dehydrated