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