Browse Source

Handle DNS renewal

master
Benoît S. 4 months ago
parent
commit
0b9132eb77
  1. 14
      deploy.py
  2. 6
      files/start-adguard.sh
  3. 4
      files/stop-adguard.sh

14
deploy.py

@ -148,3 +148,17 @@ systemd.service(
enabled=True,
)
files.put(
name='Set LE pre renewal-hook',
src='files/stop-adguard.sh',
dest='/etc/letsencrypt/renewal-hooks/pre/stop-adguard.sh',
mode='755',
)
files.put(
name='Set LE post renewal-hook',
src='files/start-adguard.sh',
dest='/etc/letsencrypt/renewal-hooks/post/start-adguard.sh',
mode='755',
)

6
files/start-adguard.sh

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
install -o adguard -g adguard -m 600 /etc/letsencrypt/live/dns.benpro.fr/privkey.pem /home/adguard/
install -o adguard -g adguard -m 600 /etc/letsencrypt/live/dns.benpro.fr/fullchain.pem /home/adguard/
systemctl start AdGuardHome.service

4
files/stop-adguard.sh

@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
systemctl stop AdGuardHome.service
Loading…
Cancel
Save