aboutsummaryrefslogtreecommitdiffstats
path: root/roles/znc/templates/acme/znc.j2
blob: de849b77153c5fffa8f7ccee33ecb05fb13b10d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# ACME deployment script
#

# NOTE:
# ZNC supports SSLKeyFile and SSLDHParamFile since v1.7
#
#cp -v /usr/local/etc/ssl/acme/private/{{ network.domain }}.pem \
#      /usr/local/etc/znc/znc.ssl.key
#cp -v /usr/local/etc/ssl/acme/{{ network.domain }}/fullchain.pem \
#      /usr/local/etc/znc/znc.ssl.crt
#chown znc:znc /usr/local/etc/znc/znc.ssl.key /usr/local/etc/znc/znc.ssl.crt
#chmod 0400    /usr/local/etc/znc/znc.ssl.key /usr/local/etc/znc/znc.ssl.crt

# SSL: https://wiki.znc.in/Signed_SSL_certificate
# Everything in a single file, in the order from the most *private* to
# the most *public* entries, except for the root certificate.
# i.e., cat ssl.key ssl.cert dhparam.pem > znc.allinone.pem
#
cat /usr/local/etc/ssl/acme/private/{{ network.domain }}.pem \
    /usr/local/etc/ssl/acme/{{ network.domain }}/fullchain.pem \
    /usr/local/etc/ssl/dhparam4096.pem \
    > /usr/local/etc/znc/znc.allinone.pem
chown znc:znc /usr/local/etc/znc/znc.allinone.pem
chmod 0400    /usr/local/etc/znc/znc.allinone.pem

reload znc