fix: remove a bug un dnssec cron

This commit is contained in:
Adrien Waksberg 2018-09-07 20:43:08 +02:00
parent 8f92f3373d
commit ad65a6e36d
2 changed files with 6 additions and 1 deletions

View file

@ -5,7 +5,7 @@ cd /etc/bind/keys
{% for zone, value in bind_zones.iteritems() %}
{% if 'dnssec' in value and value.dnssec %}
dnssec-signzone -3 $(head -n 1000 /dev/urandom | sha1sum | cut -b 1-16) -A -N INCREMENT -o {{ zone }} -t /etc/bind/zones/db.{{ zone }}
dnssec-signzone -3 $(head -n 1000 /dev/urandom | sha1sum | cut -b 1-16) -A -N INCREMENT -o {{ zone }} -t /etc/bind/zones/{{ zone }}/db
{% endif %}
{% endfor %}

View file

@ -115,3 +115,8 @@ describe command('dig +nocmd +noall +answer -t txt hello.local @127.0.0.1') do
its(:exit_status) { should eq 0 }
its(:stdout) { should contain('"0L4M99yv8ZLptmS2GP6goHXZgTdFIyYCdfziQgoENcloUI3KshDscsoh6H6I2LA"') }
end
describe command('/etc/cron.weekly/dnssec') do
its(:exit_status) { should eq 0 }
its(:stderr) { should_not contain('dnssec-signzone: fatal') }
end