Show More
@@ -0,0 +1,34 b'' | |||
|
1 | # celeryd - run the celeryd daemon as an upstart job for rhodecode | |
|
2 | # Change variables/paths as necessary and place file /etc/init/celeryd.conf | |
|
3 | # start/stop/restart as normal upstart job (ie: $ start celeryd) | |
|
4 | ||
|
5 | description "Celery for RhodeCode Mercurial Server" | |
|
6 | author "Matt Zuba <matt.zuba@goodwillaz.org" | |
|
7 | ||
|
8 | start on starting rhodecode | |
|
9 | stop on stopped rhodecode | |
|
10 | ||
|
11 | respawn | |
|
12 | ||
|
13 | umask 0022 | |
|
14 | ||
|
15 | env PIDFILE=/tmp/celeryd.pid | |
|
16 | env APPINI=/var/hg/rhodecode/production.ini | |
|
17 | env HOME=/var/hg | |
|
18 | env USER=hg | |
|
19 | # To use group (if different from user), you must edit sudoers file and change | |
|
20 | # root's entry from (ALL) to (ALL:ALL) | |
|
21 | # env GROUP=hg | |
|
22 | ||
|
23 | script | |
|
24 | COMMAND="/var/hg/.virtualenvs/rhodecode/bin/paster celeryd $APPINI --pidfile=$PIDFILE" | |
|
25 | if [ -z "$GROUP" ]; then | |
|
26 | exec sudo -u $USER $COMMAND | |
|
27 | else | |
|
28 | exec sudo -u $USER -g $GROUP $COMMAND | |
|
29 | fi | |
|
30 | end script | |
|
31 | ||
|
32 | post-stop script | |
|
33 | rm -f $PIDFILE | |
|
34 | end script |
General Comments 0
You need to be logged in to leave comments.
Login now