mirror of
https://github.com/Matir/skel.git
synced 2026-05-26 13:35:42 -07:00
15 lines
408 B
Bash
Executable File
15 lines
408 B
Bash
Executable File
#!/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
|