summaryrefslogtreecommitdiff
path: root/bin/tapicero
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2014-02-04 10:33:27 -0800
committerjessib <jessib@riseup.net>2014-02-04 10:33:27 -0800
commitc7f376cdc02fe10c7e2a51c7d52475ab34451577 (patch)
tree75c52cbbd43bb55d155c301855677fcba123a2c7 /bin/tapicero
parentcda7ebacf35bcc0fcf233e5a23b958ed751fb108 (diff)
parentc3cb71ca5e6d32960e4493d85799f3706ea91fe8 (diff)
Merge pull request #9 from azul/test/integration-with-travis
Test/integration with travis
Diffstat (limited to 'bin/tapicero')
-rwxr-xr-xbin/tapicero13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/tapicero b/bin/tapicero
index c20a114..72f974b 100755
--- a/bin/tapicero
+++ b/bin/tapicero
@@ -1,10 +1,10 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
-require 'pathname'
#
# Tapicero Daemon
#
+require 'pathname'
BASE_DIR = Pathname.new(__FILE__).realpath + '../..'
begin
@@ -46,7 +46,8 @@ end
# --overwrite-security overwrite existing couch security settings
# TODO: not implemented yet:
# --overwrite-designs overwrite existing design documents
-Tapicero::FLAGS.concat ARGV.grep(/--.*/)
+Tapicero::FLAGS.concat ARGV.grep(/--.*/)
+Tapicero::CONFIGS.concat ARGV.grep(/\.ya?ml$/)
# if flags have been set but an action is missing we assume
# tapicero should run in foreground.
@@ -59,7 +60,6 @@ end
#
# Start the daemon
#
-require 'tapicero' # so we can use Tapicero.logger below.
require 'daemons'
if ENV["USER"] == "root"
options = {:app_name => 'tapicero', :dir_mode => :system} # this will put the pid file in /var/run
@@ -70,7 +70,6 @@ begin
Daemons.run("#{BASE_DIR}/lib/tapicero_daemon.rb", options)
rescue SystemExit
rescue Exception => exc
- Tapicero.logger.error "Uncaught exception. Daemon will die."
- Tapicero.logger.error exc.class.name + ": " + exc.to_s
- Tapicero.logger.error exc.backtrace.join("\n")
+ puts exc.class.name + exc.to_s
+ puts exc.backtrace.join("\n")
end