Handle DNS renewal
This commit is contained in:
parent
f7837e68b5
commit
0b9132eb77
3 changed files with 24 additions and 0 deletions
14
deploy.py
14
deploy.py
|
@ -148,3 +148,17 @@ systemd.service(
|
||||||
enabled=True,
|
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
Normal file
6
files/start-adguard.sh
Normal file
|
@ -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
Normal file
4
files/stop-adguard.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
systemctl stop AdGuardHome.service
|
Reference in a new issue