Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
6c2e5ff1d8 | |||
29927fd050 | |||
5e0cac8118 |
@ -49,19 +49,20 @@ if __name__ == "__main__":
|
||||
try:
|
||||
with open(filepath, 'w+', 0644) as fp:
|
||||
fp.write(output)
|
||||
fp.write("\n")
|
||||
except IOError as e:
|
||||
print("could not write zone file '%s': %s" % (update['zone_name'], e))
|
||||
sys.exit(-1)
|
||||
if update['action'] == 'create_zone' and config.has_option('command', 'add_zone'):
|
||||
command = config.get('command', 'add_zone') % (update['zone_name'])
|
||||
subprocess.call(command)
|
||||
subprocess.call(command.split(' '))
|
||||
elif update['action'] != 'create_zone' and config.has_option('command', 'reload_zone'):
|
||||
command = config.get('command', 'reload_zone') % (update['zone_name'])
|
||||
subprocess.call(command)
|
||||
subprocess.call(command.split(' '))
|
||||
elif update['action'] == 'delete_zone':
|
||||
os.remove(filepath)
|
||||
if config.has_option('command', 'del_zone'):
|
||||
command = config.get('command', 'del_zone') % (update['zone_name'])
|
||||
subprocess.call(command)
|
||||
subprocess.call(command.split(' '))
|
||||
c.output_update_delete([update['id']])
|
||||
|
||||
|
4
setup.py
4
setup.py
@ -1,8 +1,8 @@
|
||||
from distutils.core import setup
|
||||
|
||||
setup(name='dim_output_bind',
|
||||
version='0.1',
|
||||
version='0.2',
|
||||
description='A plugin to write bind files from dim output.',
|
||||
scripts=['dim_output_bind'],
|
||||
data_files=[('share/dim_outout_bind', ['dim_output_bind.ini'])],
|
||||
data_files=[('etc/', ['dim_output_bind.ini.sample'])],
|
||||
install_requires=['dimclient>=0.4.2'])
|
||||
|
Loading…
Reference in New Issue
Block a user