From 27a9fc8e3d54ca9cc1f3e9290549f322df68e43f Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Fri, 25 Aug 2023 20:18:16 +0200 Subject: Add ejabberd certificate replacement --- other_scripts/ejabberd_cert.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 other_scripts/ejabberd_cert.sh diff --git a/other_scripts/ejabberd_cert.sh b/other_scripts/ejabberd_cert.sh new file mode 100644 index 0000000..4400a97 --- /dev/null +++ b/other_scripts/ejabberd_cert.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# adjust to your needs +certdir="/etc/letsencrypt/live/xmpp.uvok.de/" + +if [[ -n "$RENEWED_LINEAGE" ]]; then + certdir="$RENEWED_LINEAGE" +fi + +echo "Deploying Ejabberd cert for $certdir" + +# not sure if reload suffices, better be safe than sorry +systemctl stop ejabberd + +# adjust paths to your needs +cp -v "$certdir/fullchain.pem" "/var/lib/ejabberd/certs/fullchain.pem" +cp -v "$certdir/privkey.pem" "/var/lib/ejabberd/certs/key.pem" +chown -v ejabberd: /var/lib/ejabberd/certs/fullchain.pem /var/lib/ejabberd/certs/key.pem + +systemctl start ejabberd -- cgit v1.2.3