sh.zio.znc.update-cert: add script and services
This commit is contained in:
parent
4113e0a446
commit
c952be0c12
4 changed files with 29 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -31,6 +31,8 @@
|
|||
!/etc/systemd/system/sh.zio.backup.timer
|
||||
!/etc/systemd/system/zio-backup.service
|
||||
!/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/
|
||||
|
@ -48,6 +50,7 @@
|
|||
!/usr/local/bin/sh.zio.pod-exec
|
||||
!/usr/local/bin/sh.zio.pod-systemd
|
||||
!/usr/local/bin/sh.zio.update-rootfs
|
||||
!/usr/local/bin/sh.zio.znc.update-cert
|
||||
!/usr/local/bin/zio-backup
|
||||
!/usr/local/bin/zio-libvirt-port-forward
|
||||
!/usr/local/bin/zio-update-caddy
|
||||
|
|
6
etc/systemd/system/sh.zio.znc.update-cert.service
Normal file
6
etc/systemd/system/sh.zio.znc.update-cert.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Updates the ZNC certificate weekly
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/sh.zio.znc.update-cert
|
||||
Type=oneshot
|
11
etc/systemd/system/sh.zio.znc.update-cert.timer
Normal file
11
etc/systemd/system/sh.zio.znc.update-cert.timer
Normal file
|
@ -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
|
9
usr/local/bin/sh.zio.znc.update-cert
Executable file
9
usr/local/bin/sh.zio.znc.update-cert
Executable file
|
@ -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…
Add table
Add a link
Reference in a new issue