blob: 679ea4d67ef9949cdfa8066da63976d0909f927d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
#
# Copy the issued SSL key and certificate to deploy them for ZNC.
#
# Reference: https://wiki.znc.in/Signed_SSL_certificate
#
cp -v {{ web.ssl_root }}/{{ network.domain }}/key \
{{ znc.data_dir }}/ssl.key
cp -v {{ web.ssl_root }}/{{ network.domain }}/fullchain \
{{ znc.data_dir }}/ssl.crt
chown znc:znc {{ znc.data_dir }}/ssl.key {{ znc.data_dir }}/ssl.crt
chmod 0400 {{ znc.data_dir }}/ssl.key {{ znc.data_dir }}/ssl.crt
if pgrep -x znc >/dev/null; then
echo -n "Reloading service znc ... "
# ZNC's service file doesn't support 'reload' command
killall -SIGHUP znc
echo "done"
else
echo "WARNING: service znc is not running" >&2
fi
|