Ubuntu Pastebin

Paste from root at Sat, 1 Aug 2015 04:05:17 +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
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

    exec /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

post-stop script
    exec /var/www/shrinktheapp/bin/celery multi stopwait --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
Download as text