sh.zio.znc.update-cert: add script and services
parent
4113e0a446
commit
c952be0c12
|
@ -31,6 +31,8 @@
|
||||||
!/etc/systemd/system/sh.zio.backup.timer
|
!/etc/systemd/system/sh.zio.backup.timer
|
||||||
!/etc/systemd/system/zio-backup.service
|
!/etc/systemd/system/zio-backup.service
|
||||||
!/etc/systemd/system/zio-backup.timer
|
!/etc/systemd/system/zio-backup.timer
|
||||||
|
!/etc/systemd/system/sh.zio.znc.update-cert.service
|
||||||
|
!/etc/systemd/system/sh.zio.znc.update-cert.timer
|
||||||
|
|
||||||
# /usr/
|
# /usr/
|
||||||
!/usr/
|
!/usr/
|
||||||
|
@ -48,6 +50,7 @@
|
||||||
!/usr/local/bin/sh.zio.pod-exec
|
!/usr/local/bin/sh.zio.pod-exec
|
||||||
!/usr/local/bin/sh.zio.pod-systemd
|
!/usr/local/bin/sh.zio.pod-systemd
|
||||||
!/usr/local/bin/sh.zio.update-rootfs
|
!/usr/local/bin/sh.zio.update-rootfs
|
||||||
|
!/usr/local/bin/sh.zio.znc.update-cert
|
||||||
!/usr/local/bin/zio-backup
|
!/usr/local/bin/zio-backup
|
||||||
!/usr/local/bin/zio-libvirt-port-forward
|
!/usr/local/bin/zio-libvirt-port-forward
|
||||||
!/usr/local/bin/zio-update-caddy
|
!/usr/local/bin/zio-update-caddy
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Updates the ZNC certificate weekly
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/local/bin/sh.zio.znc.update-cert
|
||||||
|
Type=oneshot
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Updates the ZNC certificate weekly
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=weekly
|
||||||
|
Unit=sh.zio.znc.update-cert.service
|
||||||
|
AccuracySec=1h
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
ZNC_CONFIG_LOCATION="/var/lib/containers/storage/volumes/znc/_data"
|
||||||
|
SSL_PATH="/var/lib/containers/storage/volumes/caddy_data/_data/caddy/certificates/acme-v02.api.letsencrypt.org-directory/znc.zio.sh"
|
||||||
|
SSL_PATH="/root/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/wildcard_.zio.sh"
|
||||||
|
ZNCPEMBAK="$ZNC_CONFIG_LOCATION/configs/znc.pem.bak"
|
||||||
|
ZNCPEM="$ZNC_CONFIG_LOCATION/configs/znc.pem"
|
||||||
|
cp $ZNCPEM $ZNCPEMBAK
|
||||||
|
cat $SSL_PATH/wildcard_.zio.sh.key $SSL_PATH/wildcard_.zio.sh.crt > $ZNCPEM
|
||||||
|
echo "ZNC cert updated"
|
Loading…
Reference in New Issue