]> git.openstreetmap.org Git - chef.git/commitdiff
Reload gdnsd configuration when new maps are distributed
authorTom Hughes <tom@compton.nu>
Thu, 13 Jun 2019 16:42:41 +0000 (17:42 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 13 Jun 2019 16:46:06 +0000 (17:46 +0100)
cookbooks/geodns/metadata.rb
cookbooks/geodns/recipes/default.rb

index bbc676a39dbb5a0ccc3e2d5e008ecf1876a0e05f..15699486e83733ac961bd3be2a63753fac5fe09e 100644 (file)
@@ -6,3 +6,4 @@ description       "Installs and configures a geographic DNS server"
 long_description  IO.read(File.join(File.dirname(__FILE__), "README.md"))
 version           "1.0.0"
 supports          "ubuntu"
+depends           "systemd"
index 9f7c100c5b6b0f8eff17db8f455b6564b7442383..16ba44ed5f6b820587b7ab7ae853fdb5c5947e16 100644 (file)
@@ -56,6 +56,29 @@ service "gdnsd" do
   supports :status => true, :restart => true, :reload => true
 end
 
+systemd_service "gdnsd-reload" do
+  description "Reload gdnsd configuration"
+  type "simple"
+  user "root"
+  exec_start "/bin/systemctl reload-or-restart gdnsd"
+  standard_output "null"
+  private_tmp true
+  private_devices true
+  protect_system "full"
+  protect_home true
+  no_new_privileges true
+end
+
+systemd_path "gdnsd-reload" do
+  description "Reload gdnsd configuration"
+  path_changed "/etc/gdnsd/config.d"
+end
+
+service "gdnsd-reload.path" do
+  action [:enable, :start]
+  subscribes :restart, "systemd_path[gdnsd-reload]"
+end
+
 firewall_rule "accept-dns-udp" do
   action :accept
   source "net"