#!/bin/sh # Reloads traefik on certificate change cd $(dirname $0) tmpfile=fullchain.pem.bak cleanup() { rm -f $tmpfile } trap cleanup EXIT # Compare with old file cp fullchain.pem $tmpfile cp /certs/* ./ chown traefik:root -R ./ diff fullchain.pem $tmpfile >/dev/null || systemctl restart traefik