Skip to content

Instantly share code, notes, and snippets.

/.rb

Created August 5, 2015 10:28
Show Gist options
  • Save anonymous/bd81d4b542dc6b828f57 to your computer and use it in GitHub Desktop.
Save anonymous/bd81d4b542dc6b828f57 to your computer and use it in GitHub Desktop.
zabbix.templates_list.each do |name, file_number|
file_name = ("data/" + ("%06d" % file_number).to_s)
if File.exist?(file_name)
unless File.read(file_name) == zabbix.templates_export[name]
File.write(file_name, zabbix.templates_export[name])
end
else
File.write(file_name, zabbix.templates_export[name])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment