Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jjasghar
Forked from thomascate/gist:7993115
Created December 16, 2013 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjasghar/7993146 to your computer and use it in GitHub Desktop.
Save jjasghar/7993146 to your computer and use it in GitHub Desktop.
apt = execute "apt-get update" do
action :nothing
end
if 'debian' == node['platform_family']
if !File.exists?('/var/lib/apt/periodic/update-success-stamp')
apt.run_action(:run)
elsif File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - 86400
apt.run_action(:run)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment