Skip to content

Instantly share code, notes, and snippets.

@ElliottLandsborough
Last active May 31, 2019 08:28
Show Gist options
  • Save ElliottLandsborough/e3f34596ec42e6fed438bf6e5abfedab to your computer and use it in GitHub Desktop.
Save ElliottLandsborough/e3f34596ec42e6fed438bf6e5abfedab to your computer and use it in GitHub Desktop.
Ejabberd and znc with letsencrypt
#!/bin/bash
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
if test /etc/letsencrypt/live/domain.com/privkey.pem -nt /etc/ejabberd/ejabberd.pem ; then
cat /etc/letsencrypt/live/domain.com/privkey.pem /etc/letsencrypt/live/domain.com/fullchain.pem > /etc/ejabberd/ejabberd.pem
fi
if test /etc/letsencrypt/live/domain.com/privkey.pem -nt /home/znc/.znc/znc.pem ; then
cat /etc/letsencrypt/live/domain.com/privkey.pem /etc/letsencrypt/live/domain.com/fullchain.pem > /home/znc/.znc/znc.pem
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment