[sysadmin-bin] Rebuild/reload/notify nsd on DNS zone change
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Rebuild/reload/notify nsd on DNS zone change
- Date: Mon, 7 Mar 2022 18:31:40 +0000 (UTC)
commit af67ff074908ca21f683906b149aff7d5b48d565
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Mon Mar 7 19:31:21 2022 +0100
Rebuild/reload/notify nsd on DNS zone change
certbot/auth-hook | 5 ++++-
certbot/cleanup-hook | 4 ++++
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/certbot/auth-hook b/certbot/auth-hook
index 093d6a4..2349601 100755
--- a/certbot/auth-hook
+++ b/certbot/auth-hook
@@ -57,7 +57,10 @@ def main():
repo.remotes[0].push(["refs/heads/master:refs/heads/master"])
- # Wait 30s for DNS to propagate
+ subprocess.run(["sudo", "/usr/sbin/nsd-control", "rebuild"], check=True)
+ subprocess.run(["sudo", "/usr/sbin/nsd-control", "reload"], check=True)
+ subprocess.run(["sudo", "/usr/sbin/nsd-control", "notify"], check=True)
+
time.sleep(30)
diff --git a/certbot/cleanup-hook b/certbot/cleanup-hook
index c9e1921..85c673f 100755
--- a/certbot/cleanup-hook
+++ b/certbot/cleanup-hook
@@ -61,6 +61,10 @@ def main():
repo.remotes[0].push(["refs/heads/master:refs/heads/master"])
+ subprocess.run(["sudo", "/usr/sbin/nsd-control", "rebuild"], check=True)
+ subprocess.run(["sudo", "/usr/sbin/nsd-control", "reload"], check=True)
+ subprocess.run(["sudo", "/usr/sbin/nsd-control", "notify"], check=True)
+
if __name__ == "__main__":
main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]