diff --git a/container.json b/container.json index 93709d9..f6c36e8 100644 --- a/container.json +++ b/container.json @@ -1,7 +1,7 @@ { "zone": { "soa": "ns1.higgsboson.tk.", - "serial": 116, + "serial": 124, "refresh": "1H", "hostmaster": "hostmaster.higgsboson.tk", "domain": "eve.higgsboson.tk", @@ -325,7 +325,9 @@ "ipv6": "2a01:4f8:210:31fd:1::20/128", "group": "php", "vars": { - "php_extensions": [] + "php_extensions": [ + + ] } }, "phonefinder": { @@ -333,8 +335,10 @@ "ipv6": "2a01:4f8:210:31fd:1::21/128", "group": "php", "vars": { - "php_extensions": [] + "php_extensions": [ + + ] } } } -} +} \ No newline at end of file diff --git a/hooks/lib/lxc/container.rb b/hooks/lib/lxc/container.rb index acaec4a..125f91a 100644 --- a/hooks/lib/lxc/container.rb +++ b/hooks/lib/lxc/container.rb @@ -1,6 +1,7 @@ require "erb" require "netaddr" require "pathname" +require "fileutils" module Lxc class Container @@ -55,6 +56,13 @@ module Lxc c["dn42_ipv6"] = NetAddr::CIDR.create(@dn42_ipv6).to_s(Short: true) end + config_dir = File.dirname(config_path) + local_conf = File.join(config_dir, "local.conf") + unless File.exists?(local_conf) + FileUtils.touch(local_conf) + end + opts[:local_conf] = local_conf + templ = Template.new(CONFIG_ROOT.join("templates", "config.erb")) templ.write(config_path, opts) end diff --git a/templates/config.erb b/templates/config.erb index 95301e5..50c18f1 100644 --- a/templates/config.erb +++ b/templates/config.erb @@ -1,4 +1,5 @@ lxc.include = /etc/lxc/default.conf +lxc.include = <%= local_conf %> lxc.utsname = <%= name %> lxc.rootfs = <%= rootfs %> lxc.network.ipv4 = <%= ipv4 %> diff --git a/templates/rdns-zone.erb b/templates/rdns-zone.erb index bcccd7e..c5a011f 100644 --- a/templates/rdns-zone.erb +++ b/templates/rdns-zone.erb @@ -21,6 +21,6 @@ <% end -%> <% end -%> -<% pointers do |addr, name| -%> +<% zone.pointers do |name, addr| -%> <%= addr %> PTR <%= name %>.<%= data["zone"]["domain"] %>. <% end -%>