-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
631c19c
commit 440f7d1
Showing
2 changed files
with
39 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /usr/bin/python3 | ||
|
||
# Loops over all zonefiles and passes them through named-checkzone | ||
# Exits with error if named-checkzone does | ||
# Checks are in local mode | ||
|
||
import os | ||
import subprocess | ||
|
||
dir = os.fsencode('/etc/bind/zones/') | ||
for file in os.listdir(dir): | ||
filename = os.fsdecode(file) | ||
subprocess.run(['/usr/bin/named-checkzone', '-i local', filename, f'/etc/bind/zones/{filename}'], check=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters