From 696d1f1451cab48aa2c7f310e5ed88d1ef6baba5 Mon Sep 17 00:00:00 2001 From: Gabe Date: Mon, 12 May 2008 13:17:46 -0400 Subject: [PATCH] Fixing background job init --- History.txt | 2 ++ lib/recipes/centos/backgroundjob.rb | 6 +++--- lib/templates/backgroundjob/backgroundjob.initd.centos.erb | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/History.txt b/History.txt index 9606b8b..e7447cb 100644 --- a/History.txt +++ b/History.txt @@ -2,6 +2,8 @@ * Fixing backgroundjob to use --daemon * Fixing merb init to use daemon init function on start (then it plays nice with monit) +* Fixing backgroundjob init (BIN_PATH error) +* Adding --log to backgroundjob init.d == 0.3.5 2008-05-08 diff --git a/lib/recipes/centos/backgroundjob.rb b/lib/recipes/centos/backgroundjob.rb index 5ffca56..626b4b6 100644 --- a/lib/recipes/centos/backgroundjob.rb +++ b/lib/recipes/centos/backgroundjob.rb @@ -10,8 +10,8 @@
Path to start.
Defaults to:
-      \#{current_path}/script/bj --forever --rails_env=production --rails_root=\#{current_path} --redirect \
-      --redirect=\#{backgroundjob_log_path} --pidfile=\#{backgroundjob_pid_path} --daemon
+      \#{current_path}/script/bj --forever --rails_env=production --rails_root=\#{current_path} \
+      --redirect=\#{backgroundjob_log_path} --log=\#{backgroundjob_log_path} --pidfile=\#{backgroundjob_pid_path} --daemon
     
backgroundjob_pid_path
@@ -30,7 +30,7 @@ fetch_or_default(:backgroundjob_log_path, "#{shared_path}/log/bj.log") default_bin_path = "#{current_path}/script/bj run --forever --rails_env=production --rails_root=#{current_path} \ ---redirect=#{backgroundjob_log_path} --pidfile=#{backgroundjob_pid_path} --daemon" +--redirect=#{backgroundjob_log_path} --log=#{backgroundjob_log_path} --pidfile=#{backgroundjob_pid_path} --daemon" fetch_or_default(:backgroundjob_bin_path, default_bin_path) diff --git a/lib/templates/backgroundjob/backgroundjob.initd.centos.erb b/lib/templates/backgroundjob/backgroundjob.initd.centos.erb index a38ca04..7b21d34 100644 --- a/lib/templates/backgroundjob/backgroundjob.initd.centos.erb +++ b/lib/templates/backgroundjob/backgroundjob.initd.centos.erb @@ -13,7 +13,7 @@ RETVAL=0 DESC="backgroundjob daemon (<%= application %>)" -BIN_PATH"<%= backgroundjob_bin_path %>" +BIN_PATH="<%= backgroundjob_bin_path %>" PID_FILE="<%= backgroundjob_pid_path %>" start() {