Ubuntu Pastebin

Paste from root at Sat, 1 Aug 2015 02:25:29 +0000

Download as text
 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
35
36
37
38
39
40
41
42
43
44
45
description "Celery daemon"
author      "Roman Gorodeckij <holms@holms.lt>"

task
start on starting rc-sysinit

pre-start script

    # Source virtualenv
    . /var/www/shrinktheapp/bin/activate

    # Source the config file
    . /etc/default/celery
    # Source application related env file
    . /etc/environment

   if [ ! -d ${CELERYD_LOG_DIR} ]; then
        mkdir -p ${CELERYD_LOG_DIR}
        chown "www":"www" ${CELERYD_LOG_DIR}
    fi

    if [ ! -d ${CELERY_RUN_DIR} ]; then
        mkdir -p ${CELERYD_RUN_DIR}
        chown "www":"www" ${CELERYD_RUN_DIR}
    fi


    /var/www/shrinktheapp/bin/celery multi start  \
                --pidfile=${CELERYD_PID_FILE} \
                --logfile=${CELERYD_LOG_FILE} \
                --loglevel=${CELERYD_LOG_LEVEL} \
                --app=${CELERYD_APP} \
                --workdir="/var/www/shrinktheapp/project" \
                --uid=www \
                --gid=www \
                --beat \
                ${CELERYD_NODES} \
                ${CELERYD_OPTS}
end script
pre-stop script
    for pidfile in /var/www/shrinktheapp/project/run/*.pid
    do
        kill $(cat $pidfile)
    done
end script
Download as text