Skip to content

Commit

Permalink
added simple http_content check
Browse files Browse the repository at this point in the history
  • Loading branch information
auxesis committed Jun 30, 2009
1 parent 6f1704f commit 25dcda3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/flapjack/checks/http_content
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env ruby

require 'open-uri'

page = ARGV[0]
string = ARGV[1]

exit 2 unless page && string

body = open(page).read
if body =~ /#{string}/
exit 0
else
exit 2
end

0 comments on commit 25dcda3

Please sign in to comment.