Adapt hook scripts

tags/smeserver-letsencrypt-client-0.2.4-1
Daniel Berteaud 9 years ago
parent c926162fc3
commit 3a24f881ba
  1. 7
      root/etc/letsencrypt.sh/hooks_clean_challenge.d/10smeserver.sh
  2. 17
      root/etc/letsencrypt.sh/hooks_deploy_cert.d/10smeserver.sh

@ -0,0 +1,7 @@
#!/bin/sh
ALTNAME=${1}
if [[ "$ALTNAME" == "" ]]; then
echo "Error while creating or renewing letsencrypt certificate" | mail -s "Letsencrypt error" admin
fi

@ -1,13 +1,10 @@
#!/bin/sh #!/bin/sh
ACTION=${1}
if [[ "$ACTION" == "deploy_cert" ]]; then
# New cert # New cert
DOM=${2} DOM=${1}
KEY=${3} KEY=${2}
CRT=${4} CRT=${3}
CHAIN=${5} CHAIN=${4}
/sbin/e-smith/db configuration setprop modSSL key $KEY crt $CRT CertificateChainFile $CHAIN /sbin/e-smith/db configuration setprop modSSL key $KEY crt $CRT CertificateChainFile $CHAIN
# There's a new ssl-udpate event which update everything in a single event # There's a new ssl-udpate event which update everything in a single event
# fallback to manual operations if this event doesn't exist # fallback to manual operations if this event doesn't exist
@ -36,9 +33,3 @@ if [[ "$ACTION" == "deploy_cert" ]]; then
/usr/bin/letsencrypt.sh -r /home/e-smith/db/letsencrypt.sh/certs/$DOM/$cert /usr/bin/letsencrypt.sh -r /home/e-smith/db/letsencrypt.sh/certs/$DOM/$cert
fi fi
done done
elif [[ "$ACTION" == "clean_challenge" ]]; then
ALTNAME=${2}
if [[ "$ALTNAME" == "" ]]; then
echo "Error while creating or renewing letsencrypt certificate" | mail -s "Letsencrypt error" admin
fi
fi

Loading…
Cancel
Save