Skip to content

Instantly share code, notes, and snippets.

@narkisr
Created December 30, 2011 00:32
Show Gist options
  • Save narkisr/1536921 to your computer and use it in GitHub Desktop.
Save narkisr/1536921 to your computer and use it in GitHub Desktop.
zfs scrubing
#!/usr/bin/env ruby
require 'gmail'
def email_scrub_run(status)
gmail = Gmail.new('foo', 'bar')
gmail.deliver do
to "[email protected]"
subject "Your scheduled Zfs scrub was just performed "
text_part do
body "Scrub result is #{status}"
end
end
end
output = `/sbin/zpool scrub storage`
email_scrub_run(output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment