add documentation and fix --help

This commit is contained in:
Jannis Hübl
2016-01-15 11:18:53 +01:00
parent 0affff21d1
commit 4a0c2d78e2
3 changed files with 8 additions and 6 deletions

View File

@@ -132,12 +132,13 @@ To run Crono daemon, in your Rails project root directory:
crono usage:
```
Usage: crono [options]
Usage: crono [options] start|stop|restart|run
-C, --cronotab PATH Path to cronotab file (Default: config/cronotab.rb)
-L, --logfile PATH Path to writable logfile (Default: log/crono.log)
-P, --pidfile PATH Path to pidfile (Default: tmp/pids/crono.pid)
-d, --[no-]daemonize Daemonize process (Default: false)
-e, --environment ENV Application environment (Default: development)
--piddir PATH Path to piddir (Default: tmp/pids)
-N, --process_name name Name of the process (Default: crono)
-m, --monitor Start monitor process for a deamon (Default false)
-e, --environment ENV Application environment (Default: development)
```

View File

@@ -132,7 +132,7 @@ module Crono
config.logfile = logfile
end
opts.on("-P", "--pidfile PATH", "Path to pidfile (Default: #{config.pidfile})") do |pidfile|
opts.on("-P", "--pidfile PATH", "Deprecated! use --piddir with --process_name; Path to pidfile (Default: #{config.pidfile})") do |pidfile|
config.pidfile = pidfile
end
@@ -140,7 +140,7 @@ module Crono
config.piddir = piddir
end
opts.on("-N", "--process_name name", "Name of the process (Default: #{config.process_name})") do |process_name|
opts.on("-N", "--process_name NAME", "Name of the process (Default: #{config.process_name})") do |process_name|
config.process_name = process_name
end

View File

@@ -13,6 +13,7 @@ module Crono
def initialize
self.cronotab = CRONOTAB
self.logfile = LOGFILE
@pidfile = PIDFILE
self.piddir = PIDDIR
self.process_name = PROCESS_NAME
self.daemonize = false