#!/bin/sh

set -eu

set -- $RENEWED_DOMAINS
[ "$1" = janet.servers.dxld.at ] || exit 0

# In case they are links
rm -f /etc/exim4/exim.crt /etc/exim4/exim.key


cp "$RENEWED_LINEAGE"/fullchain.pem /etc/exim4/exim.crt
cp "$RENEWED_LINEAGE"/privkey.pem /etc/exim4/exim.key

chmod 755 /etc/exim4/exim.crt
chown root:root /etc/exim4/exim.crt

chmod 740 /etc/exim4/exim.key
chown root:Debian-exim /etc/exim4/exim.key
