public
Description: Tumblebot that feeds ni.hili.st. Plays well with Autumn Leaves.
Homepage: http://ni.hili.st/post/20314520
Clone URL: git://github.com/flogic/nihilist_bot.git
nihilist_bot / big-switch.rb
100755 28 lines (25 sloc) 1.059 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/ruby
#
# Controller for the Autumn Leaves daemon. Starts, stops, and manages the
# daemon.
#
# Usage: big-switch.rb <command> <options> -- <application options>
#
# * where <command> is one of:
# start start an instance of the application
# stop stop all instances of the application
# restart stop all instances and restart them afterwards
# run start the application and stay on top
# zap set the application to a stopped state
#
# * and where <options> may contain several of the following:
#
# -t, --ontop Stay on top (does not daemonize)
# -f, --force Force operation
#
# Common options:
# -h, --help Show this message
# --version Show version
 
require 'rubygems'
require 'daemons'
 
Daemons.run "#{File.dirname(__FILE__)}/genesis.rb", :app_name => 'autumn-leaves', :dir_mod => :script, :multiple => false, :backtrace => true, :monitor => false, :log_output => true