#!/bin/sh if [ -n $ENABLE_SSL ]; then # exit if any of the required files for renew is missing for file in /data/ssl/account.key /data/ssl/domain.csr; do [[ ! -f $file ]] && exit done python3 -m acme_tiny --account-key /data/ssl/account.key --csr /data/ssl/domain.csr --acme-dir /run/nginx/challenges > /tmp/cert.crt && mv /tmp/cert.crt /data/ssl/cert.crt s6-svc -du /etc/s6/nginx fi