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 |
@@ -1,26 +1,26 b'' | |||||
1 | # rhodecode - run the rhodecode daemon as an upstart job |
|
1 | # rhodecode - run the rhodecode daemon as an upstart job | |
2 | # Change variables/paths as necessary and place file /etc/init/rhodecode.conf |
|
2 | # Change variables/paths as necessary and place file /etc/init/rhodecode.conf | |
3 | # start/stop/restart as normal upstart job (ie: $ start rhodecode) |
|
3 | # start/stop/restart as normal upstart job (ie: $ start rhodecode) | |
4 |
|
4 | |||
5 | description "RhodeCode Mercurial Server" |
|
5 | description "RhodeCode Mercurial Server" | |
6 | author "Matt Zuba <matt.zuba@goodwillaz.org" |
|
6 | author "Matt Zuba <matt.zuba@goodwillaz.org" | |
7 |
|
7 | |||
8 | start on (local-filesystems and runlevel [2345]) |
|
8 | start on (local-filesystems and runlevel [2345]) | |
9 | stop on runlevel [!2345] |
|
9 | stop on runlevel [!2345] | |
10 |
|
10 | |||
11 | respawn |
|
11 | respawn | |
12 |
|
12 | |||
13 | umask 0022 |
|
13 | umask 0022 | |
14 |
|
14 | |||
15 | env PIDFILE=/var/hg/rhodecode/rhodecode.pid |
|
15 | env PIDFILE=/var/hg/rhodecode/rhodecode.pid | |
16 | env LOGFILE=/var/hg/rhodecode/log/rhodecode.log |
|
16 | env LOGFILE=/var/hg/rhodecode/log/rhodecode.log | |
17 | env APPINI=/var/hg/rhodecode/production.ini |
|
17 | env APPINI=/var/hg/rhodecode/production.ini | |
18 | env HOME=/var/hg |
|
18 | env HOME=/var/hg | |
19 | env USER=hg |
|
19 | env USER=hg | |
20 | env GROUP=hg |
|
20 | env GROUP=hg | |
21 |
|
21 | |||
22 | exec /var/hg/.virtualenvs/rhodecode/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI |
|
22 | exec /var/hg/.virtualenvs/rhodecode/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI | |
23 |
|
23 | |||
24 | post-stop script |
|
24 | post-stop script | |
25 | rm $PIDFILE |
|
25 | rm -f $PIDFILE | |
26 | end script |
|
26 | end script |
General Comments 0
You need to be logged in to leave comments.
Login now