module HttpdConfigmapGenerator::Base::ConfigHelper

Public Instance Methods

config_file_backup(path) click to toggle source
# File lib/httpd_configmap_generator/base/config_helper.rb, line 7
def config_file_backup(path)
  if File.exist?(path)
    timestamp = Time.current.strftime(TIMESTAMP_FORMAT)
    FileUtils.copy(path, "#{path}.#{timestamp}")
  end
end