#!/bin/sh # wait for nginx to startup, for http challenge sv start nginx || exit 1 sleep 10 # half a day, 60 * 60 * 12 INTERVAL=43200 mkdir -p /data/wellknown/acme-challenge /app/dehydrated/dehydrated --register --accept-terms --config /app/letsencrypt/config while true; do echo "Updating certificates" /app/dehydrated/dehydrated --cron --config /app/letsencrypt/config nginx -s reload # certificates might have changed sleep $INTERVAL done