mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Script to rotate weechat key with letsencrypt.
This commit is contained in:
14
dotfiles/weechat/letsencrypt.sh
Normal file
14
dotfiles/weechat/letsencrypt.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Update the weechat SSL key. Should be called from cron via sudo.
|
||||
|
||||
eval WEEDIR="$(printf "~%q/.weechat/" "${SUDO_USER}")"
|
||||
LIVEKEY="${WEEDIR}/ssl/relay.pem"
|
||||
|
||||
certbot renew -q
|
||||
cat /etc/letsencrypt/live/$(hostname -f)/{privkey,fullchain}.pem > \
|
||||
${LIVEKEY}
|
||||
chown ${SUDO_USER}:$(id -gn ${SUDO_USER}) ${LIVEKEY}
|
||||
for fifo in ${WEEDIR}/weechat_fifo* ; do
|
||||
echo '*/relay sslcertkey' > ${fifo}
|
||||
done
|
||||
Reference in New Issue
Block a user