Signed-off-by: Christian Couder <[email protected]>
---
doc/templates/centos/git-ultrasphinx | 13 +++++++------
doc/templates/ubuntu/git-ultrasphinx | 11 ++++++-----
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/doc/templates/centos/git-ultrasphinx
b/doc/templates/centos/git-ultrasphinx
index 296be51..ca018f3 100755
--- a/doc/templates/centos/git-ultrasphinx
+++ b/doc/templates/centos/git-ultrasphinx
@@ -8,13 +8,14 @@
# processname: searchd
# pidfile: /var/www/gitorious/db/sphinx/log/searchd.pid
+GITORIOUS_HOME="/var/www/gitorious"
RETVAL=0
-START_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:start
RAILS_ENV=production"
-STOP_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:stop
RAILS_ENV=production"
-RESTART_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:restart
RAILS_ENV=production"
-STATUS_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:status
RAILS_ENV=production"
+START_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:start
RAILS_ENV=production"
+STOP_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:stop
RAILS_ENV=production"
+RESTART_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:restart
RAILS_ENV=production"
+STATUS_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:status
RAILS_ENV=production"
LOCK_FILE=/var/lock/git-ultrasphinx
-PID_FILE=/var/www/gitorious/db/sphinx/log/searchd.pid
+PID_FILE=$GITORIOUS_HOME/db/sphinx/log/searchd.pid
case "$1" in
start)
@@ -33,4 +34,4 @@ case "$1" in
echo $"Usage: $0 {start|stop|restart|status}"
RETVAL=1
esac
-exit $RETVAL
\ No newline at end of file
+exit $RETVAL
diff --git a/doc/templates/ubuntu/git-ultrasphinx
b/doc/templates/ubuntu/git-ultrasphinx
index b5ee8f6..0521826 100755
--- a/doc/templates/ubuntu/git-ultrasphinx
+++ b/doc/templates/ubuntu/git-ultrasphinx
@@ -11,13 +11,14 @@
# Author: Fabio Akita <[email protected]>
+GITORIOUS_HOME="/var/www/gitorious"
RETVAL=0
-START_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:start
RAILS_ENV=production"
-STOP_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:stop
RAILS_ENV=production"
-RESTART_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:restart
RAILS_ENV=production"
-STATUS_CMD="cd /var/www/gitorious/ && rake ultrasphinx:daemon:status
RAILS_ENV=production"
+START_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:start
RAILS_ENV=production"
+STOP_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:stop
RAILS_ENV=production"
+RESTART_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:restart
RAILS_ENV=production"
+STATUS_CMD="cd $GITORIOUS_HOME && rake ultrasphinx:daemon:status
RAILS_ENV=production"
LOCK_FILE=/var/lock/git-ultrasphinx
-PID_FILE=/var/www/gitorious/db/sphinx/log/searchd.pid
+PID_FILE=$GITORIOUS_HOME/db/sphinx/log/searchd.pid
case "$1" in
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]