Skip to content

Commit

Permalink
webmail: use acme.sh from host
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Oct 18, 2024
1 parent 8d45d55 commit 2aa17cc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions provision/webmail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit 2aa17cc

Please sign in to comment.