Otherwise RAILS_ENV is unset when user is changed to "git".

Signed-off-by: Christian Couder <[email protected]>
---
 doc/templates/centos/git-poller |    4 ++--
 doc/templates/ubuntu/git-poller |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/templates/centos/git-poller b/doc/templates/centos/git-poller
index bf4837a..5c3f7c5 100755
--- a/doc/templates/centos/git-poller
+++ b/doc/templates/centos/git-poller
@@ -39,7 +39,7 @@ start()
   do_check_pid
   if [ $RUNNING != 2 ] ; then
     echo -n $"Starting $PROG:"
-    /bin/su - git -c "$GIT_POLLER start"
+    /bin/su - git -c "RAILS_ENV=$RAILS_ENV $GIT_POLLER start"
     sleep 4
     if [ -f $PID_FILE ] ; then
       echo "Success"
@@ -65,7 +65,7 @@ stop()
     failure $"Stopping $PROG"
   else
     #killproc -p $PID_FILE
-    /bin/su - git -c "$GIT_POLLER stop"
+    /bin/su - git -c "RAILS_ENV=$RAILS_ENV $GIT_POLLER stop"
    sleep 4
   fi
   RETVAL=$?
diff --git a/doc/templates/ubuntu/git-poller b/doc/templates/ubuntu/git-poller
index e534958..558a5fb 100755
--- a/doc/templates/ubuntu/git-poller
+++ b/doc/templates/ubuntu/git-poller
@@ -40,7 +40,7 @@ start()
   do_check_pid
   if [ $RUNNING != 2 ] ; then
     echo -n "Starting $PROG: "
-    /bin/su - git -c "$GIT_POLLER start"
+    /bin/su - git -c "RAILS_ENV=$RAILS_ENV $GIT_POLLER start"
     sleep 4
     if [ -f $PID_FILE ] ; then
       echo "Success"
@@ -66,7 +66,7 @@ stop()
     RETVAL=1
   else
     #killproc -p $PID_FILE
-    /bin/su - git -c "$GIT_POLLER stop"
+    /bin/su - git -c "RAILS_ENV=$RAILS_ENV $GIT_POLLER stop"
     RETVAL=$?
     sleep 4
   fi
-- 
1.7.4.1.42.g43f9f 
 
*******************************
This e-mail contains information for the intended recipient only. It may 
contain proprietary material or confidential information. If you are not the 
intended recipient you are not authorised to distribute, copy or use this 
e-mail or any attachment to it. Murex cannot guarantee that it is virus free 
and accepts no responsibility for any loss or damage arising from its use. If 
you have received this e-mail in error please notify immediately the sender and 
delete the original email received, any attachments and all copies from your 
system.

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

Reply via email to