From 2aa17cc6d36743302ddf20fe72ba0f6be63c09ab Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Fri, 18 Oct 2024 13:52:53 -0700 Subject: [PATCH] webmail: use acme.sh from host --- provision/webmail.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/provision/webmail.sh b/provision/webmail.sh index 3935ba8e..85dc2718 100755 --- a/provision/webmail.sh +++ b/provision/webmail.sh @@ -400,7 +400,8 @@ configure_webmail() configure_webmail_pf - _htdocs="$ZFS_DATA_MNT/webmail/htdocs" + _data="$ZFS_DATA_MNT/webmail" + _htdocs="$_data/htdocs" if [ ! -d "$_htdocs" ]; then mkdir -p "$_htdocs" fi @@ -419,12 +420,12 @@ EO_ROBOTS_TXT fi if [ "$TOASTER_WEBMAIL_PROXY" = "nginx" ]; then - stage_exec acme.sh --set-default-ca --server letsencrypt - stage_exec acme.sh -d "$TOASTER_HOSTNAME" --issue --webroot=/data/htdocs - stage_exec acme.sh --install-cert -d "$TOASTER_HOSTNAME" \ - --key-file /data/etc/tls/private/$TOASTER_HOSTNAME.pem \ - --fullchain-file /data/etc/tls/certs/$TOASTER_HOSTNAME.pem \ - --reloadcmd "service nginx reload" + acme.sh --set-default-ca --server letsencrypt + acme.sh -d "$TOASTER_HOSTNAME" --issue --webroot=$_htdocs + acme.sh --install-cert -d "$TOASTER_HOSTNAME" \ + --key-file $_data/etc/tls/private/$TOASTER_HOSTNAME.pem \ + --fullchain-file $_data/etc/tls/certs/$TOASTER_HOSTNAME.pem \ + --reloadcmd "jexec webmail service nginx reload" fi }