From 919784788f71ea64caa92010630b4e0e728f2fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Mon, 24 Feb 2020 09:58:27 +0100 Subject: [PATCH] new example for updating weechat ssl --- Example:-deploy-cert-for-weechat-relay-server.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Example:-deploy-cert-for-weechat-relay-server.md diff --git a/Example:-deploy-cert-for-weechat-relay-server.md b/Example:-deploy-cert-for-weechat-relay-server.md new file mode 100644 index 0000000..f013e9e --- /dev/null +++ b/Example:-deploy-cert-for-weechat-relay-server.md @@ -0,0 +1,12 @@ +Example hook snipped to combine key and cert into weechat's relay.pem file and notify weechat to reload the file + +```shell + IRC_DOMAIN="irc.example.com" + IRC_USER="username" + + if [[ $DOMAIN == $IRC_DOMAIN]]; then + [ -f $CERTFILE ] && [ -f $KEYFILE ] && \ + cat $CERTFILE $KEYFILE >/home/${IRC_USER}/.weechat/ssl/relay.pem + [ -p /home/${IRC_USER}/.weechat/weechat_fifo ] && echo '*/relay sslcertkey' >/home/${IRC_USER}/.weechat/weechat_fifo + fi +``` \ No newline at end of file