Rewriting startup script to support prowl notifications example or docs?

35 views
Skip to first unread message

rubybox

unread,
Sep 17, 2012, 2:55:56 PM9/17/12
to god...@googlegroups.com
I have this code but find the docs on godrb site very unclear on how to exactly add a notification with prowl, Is there some place to find full documentation on how to implement this?

I have this script:

redis_root = "/usr/sbin"

# Redis
%w{6379}.each do |port|
  God.watch do |w|
    w.name = "redis"
    w.interval = 30.seconds
    w.start = "redis-server"
    w.stop = "redis-cli -p #{port} shutdown"
    w.restart = "#{w.stop} && #{w.start}"
    w.start_grace = 10.seconds
    w.restart_grace = 10.seconds
    w.log = File.join(ENV['RAILS_ROOT'], 'log', 'redis.log')

    w.start_if do |start|
      start.condition(:process_running) do |c|
        c.interval = 5.seconds
        c.running = false
      end
    end
  end
end

I would like to add prowl support to, so I get an push message on my Iphone whenever this service is going down.

This is all that's listed on the godrb.com site,


Prowl

Send a notice to Prowl (<a href="http://prowl.weks.net/">http://prowl.weks.net/</a>).

God::Contacts::Prowl.defaults do |d|
  ...
end

God.contact(:prowl) do |c|
  ...
end
apikey - The String API key.
Reply all
Reply to author
Forward
0 new messages