lib/process/daemon/controller.rb in process-daemon-0.5.4 vs lib/process/daemon/controller.rb in process-daemon-0.5.5
- old
+ new
@@ -37,11 +37,11 @@
@stop_timeout = options[:stop_timeout] || 10.0
end
# This function is called from the daemon executable. It processes ARGV and checks whether the user is asking for `start`, `stop`, `restart`, `status`.
def daemonize(argv = ARGV)
- case argv.shift.to_sym
+ case (argv.shift || :default).to_sym
when :start
start
status
when :stop
stop
@@ -53,10 +53,10 @@
start
status
when :status
status
else
- @stderr.puts Rainbow("Invalid command. Please specify start, restart, stop or status.").red
+ @output.puts Rainbow("Invalid command. Please specify start, restart, stop or status.").red
end
end
# Fork a child process, detatch it and run the daemon code.
def spawn