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