Mercurial > kallithea
annotate init.d/rhodecode-upstart.conf @ 1864:baef43bc457c beta
revert default to 20, for large repositories it's better to go less and have it faster.
This is still saved in user session so everyone can set high number and have it saved while logged in.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 09 Jan 2012 03:45:21 +0200 |
parents | 58df0b3ed377 |
children |
rev | line source |
---|---|
1803
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
1 # rhodecode - run the rhodecode daemon as an upstart job |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
2 # Change variables/paths as necessary and place file /etc/init/rhodecode.conf |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
3 # start/stop/restart as normal upstart job (ie: $ start rhodecode) |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
4 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
5 description "RhodeCode Mercurial Server" |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
6 author "Matt Zuba <matt.zuba@goodwillaz.org" |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
7 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
8 start on (local-filesystems and runlevel [2345]) |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
9 stop on runlevel [!2345] |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
10 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
11 respawn |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
12 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
13 umask 0022 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
14 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
15 env PIDFILE=/var/hg/rhodecode/rhodecode.pid |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
16 env LOGFILE=/var/hg/rhodecode/log/rhodecode.log |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
17 env APPINI=/var/hg/rhodecode/production.ini |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
18 env HOME=/var/hg |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
19 env USER=hg |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
20 env GROUP=hg |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
21 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
22 exec /var/hg/.virtualenvs/rhodecode/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
23 |
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
24 post-stop script |
1811
58df0b3ed377
Add Celery upstart file and fix post-stop for rhodecode upstart
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
1803
diff
changeset
|
25 rm -f $PIDFILE |
1803
96789e1b0064
Debian/Ubuntu upstart script
Matt Zuba <matt.zuba@goodwillaz.org>
parents:
diff
changeset
|
26 end script |