deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [5/5] git commit: Core: Print warning when starting as a daemon without thin
Date Mon, 14 Jan 2013 10:59:00 GMT
Updated Branches:
  refs/heads/master d3e5972a7 -> e7338751b


Core: Print warning when starting as a daemon without thin


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/fcb23e0b
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/fcb23e0b
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/fcb23e0b

Branch: refs/heads/master
Commit: fcb23e0b89860f855715a7e0f87804a3a423d61b
Parents: 6726753
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Dec 13 11:51:38 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Jan 14 11:58:01 2013 +0100

----------------------------------------------------------------------
 server/bin/deltacloudd |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fcb23e0b/server/bin/deltacloudd
----------------------------------------------------------------------
diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd
index d9ebcfc..18f8b94 100755
--- a/server/bin/deltacloudd
+++ b/server/bin/deltacloudd
@@ -165,7 +165,10 @@ end
 ENV["API_HOST"] = "localhost" unless ENV["API_HOST"]
 ENV["API_PORT"] = "3001" unless ENV["API_PORT"]
 
-unless options[:daemon]
+have_thin = options[:webrick].nil? && library_present?('thin')
+have_rerun = library_present?('rerun')
+
+if !options[:daemon] || options[:daemon] && !have_thin
   msg = "Starting Deltacloud API :: #{ENV["API_DRIVER"]} "
   msg << ":: #{ENV['API_PROVIDER']} " if ENV['API_PROVIDER']
   api_uri = ENV['API_FRONTEND'] == 'cimi' ? 'cimi/cloudEntryPoint' : 'api'
@@ -184,12 +187,11 @@ if ENV['API_USER'] && ENV['API_PASSWORD']
   puts
 end
 
-have_thin = options[:webrick].nil? && library_present?('thin')
-have_rerun = library_present?('rerun')
-
 unless have_thin
   require 'rack'
 
+  puts "To start Deltacloud as a daemon, install 'thin' (gem install thin)\n\n" if options[:daemon]
+
   # Read in config.ru and convert it to an instance of Rack::Builder
   cfgfile = File.read(File.join($top_srcdir, 'config.ru'))
   inner_app = eval("Rack::Builder.new {(" + cfgfile + "\n )}.to_app",


Mime
View raw message