Skip to content

Instantly share code, notes, and snippets.

@russ
Created November 5, 2008 20:57
Show Gist options
  • Save russ/22424 to your computer and use it in GitHub Desktop.
Save russ/22424 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'simple-daemon'
class Daemon < SimpleDaemon::Base
SimpleDaemon::WorkingDirectory = File.join(File.dirname(__FILE__), '..', 'log')
def self.start
puts "Starting"
loop do
end
end
def self.stop
puts "Stopping"
end
end
Daemon.daemonize
./daemon.rb start
./daemon.rb stop
./daemon.rb restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment