From 1c41ca692b58b7a33da22985aea9aea31753d4ea Mon Sep 17 00:00:00 2001 From: Christopher Engelhard Date: Aug 18 2020 09:05:36 +0000 Subject: initial commit --- diff --git a/account.conf b/account.conf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/account.conf diff --git a/acme.sh_launcher b/acme.sh_launcher new file mode 100644 index 0000000..4f14578 --- /dev/null +++ b/acme.sh_launcher @@ -0,0 +1,23 @@ +#!/bin/sh +# set up environment for acme.sh before launching the script + +# set default paths unless user has set them already +# everything else can be set through account.conf +LE_WORKING_DIR=${LE_WORKING_DIR:-"/usr/share/acme.sh"} +LE_CONFIG_HOME=${LE_CONFIG_HOME:-"/var/lib/acme.sh"} +ACCOUNT_CONF_PATH=${ACCOUNT_CONF_PATH:-"/etc/acme.sh/acme.sh.conf"} + +# file to source DNS API credentials from +#DNSAPI_CONF_PATH="/etc/acme.sh/dnsapi.conf" + +# if that file exists, source & export variables from it +#if [ -f "$DNSAPI_CONF_PATH" ]; then +# set -o allexport +# . "$DNSAPI_CONF_PATH" +# set +o allexport +#fi + +# launch acme.sh +./usr/share/acme.sh/acme.sh "$@" + +exit $? diff --git a/acme_sh.service b/acme_sh.service new file mode 100644 index 0000000..2418aa9 --- /dev/null +++ b/acme_sh.service @@ -0,0 +1,10 @@ +[Unit] +Description=Renew Let's Encrypt certificates using acme.sh +After=network-online.target + +[Service] +Type=oneshot +# Directory where the acme.sh script resides. +ExecStart=/usr/bin/acme.sh --renew-all +# acme.sh returns 2 when renewal is skipped (i.e. certs up to date) +SuccessExitStatus=0 2 diff --git a/acme_sh.timer b/acme_sh.timer new file mode 100644 index 0000000..214fde5 --- /dev/null +++ b/acme_sh.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Daily renewal of Let's Encrypt's certificates + +[Timer] +OnCalendar=daily +RandomizedDelaySec=1h +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/dnsapi.conf b/dnsapi.conf new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/dnsapi.conf