By the way, PROG was not set, and LSB information was missing. Signed-off-by: Christian Couder <[email protected]> --- doc/templates/centos/git-poller | 9 ++++++--- doc/templates/ubuntu/git-poller | 30 +++++++++++++++++------------- 2 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/doc/templates/centos/git-poller b/doc/templates/centos/git-poller index c5e3bb7..bf4837a 100755 --- a/doc/templates/centos/git-poller +++ b/doc/templates/centos/git-poller @@ -6,18 +6,21 @@ # description: GIT-Poller server daemon # # processname: poller +# pidfile: /var/www/gitorious/tmp/pids/poller0.pid # Author: Antonio Marques <[email protected]> # source function library . /etc/rc.d/init.d/functions -export RAILS_ENV=production -GITORIOUS_HOME=/var/www/gitorious +RUBY_HOME="/opt/ruby-enterprise" +GITORIOUS_HOME="/var/www/gitorious" RETVAL=0 -GIT_POLLER="/usr/bin/ruby $GITORIOUS_HOME/script/poller" +PROG="poller" +GIT_POLLER="$RUBY_HOME/bin/ruby $GITORIOUS_HOME/script/poller" LOCK_FILE=/var/lock/git-poller PID_FILE=$GITORIOUS_HOME/tmp/pids/poller0.pid +export RAILS_ENV=production do_check_pid() { if [ -f $PID_FILE ]; then diff --git a/doc/templates/ubuntu/git-poller b/doc/templates/ubuntu/git-poller index 46e986c..736fa93 100755 --- a/doc/templates/ubuntu/git-poller +++ b/doc/templates/ubuntu/git-poller @@ -1,21 +1,25 @@ #!/bin/bash -# -# init file for Gitorious GIT-Poller daemon -# -# chkconfig: 2345 55 25 -# description: GIT-Poller server daemon -# -# processname: poller +### BEGIN INIT INFO +# Provides: Gitorious GIT-Poller +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: GIT-Poller server daemon +# Description: Starts the GIT-Poller needed by Gitorious +### END INIT INFO # Author: Antonio Marques <[email protected]> - -export RAILS_ENV=production -GITORIOUS_HOME=/var/www/gitorious + +RUBY_HOME="/opt/ruby-enterprise" +GITORIOUS_HOME="/var/www/gitorious" RETVAL=0 -GIT_POLLER="/usr/bin/ruby $GITORIOUS_HOME/script/poller" +PROG="poller" +GIT_POLLER="$RUBY_HOME/bin/ruby $GITORIOUS_HOME/script/poller" LOCK_FILE=/var/lock/git-poller PID_FILE=$GITORIOUS_HOME/tmp/pids/poller0.pid - +export RAILS_ENV=production + do_check_pid() { if [ -f $PID_FILE ]; then PID=`cat $PID_FILE` @@ -25,7 +29,7 @@ do_check_pid() { RUNNING=0 fi } - + runlevel=$(set -- $(runlevel); eval "echo $$#" ) start() -- 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]
