[Python-modules-commits] r20604 - in packages/celery/trunk/debian (4 files)
fladi-guest at users.alioth.debian.org
fladi-guest at users.alioth.debian.org
Mon Feb 27 13:29:45 UTC 2012
Date: Monday, February 27, 2012 @ 13:29:44
Author: fladi-guest
Revision: 20604
Update init scripts.
Added:
packages/celery/trunk/debian/python-celery.celeryd.default
(from rev 20049, packages/celery/trunk/debian/python-celery.default)
Modified:
packages/celery/trunk/debian/patches/lsb-init.patch
packages/celery/trunk/debian/rules
Deleted:
packages/celery/trunk/debian/python-celery.default
Modified: packages/celery/trunk/debian/patches/lsb-init.patch
===================================================================
--- packages/celery/trunk/debian/patches/lsb-init.patch 2012-02-27 06:58:06 UTC (rev 20603)
+++ packages/celery/trunk/debian/patches/lsb-init.patch 2012-02-27 13:29:44 UTC (rev 20604)
@@ -1,6 +1,7 @@
-Description: LSB compliant headers and status actions
- Upstream ships init script but they lack some LSB header and the (optional)
- "status" action. This patch fixes both.
+Description: LSB compliant headers, status actions and ENABLED variable
+ Upstream ships it's own init scripts but they lack some LSB header and the
+ (optional) "status" action. This patch fixes this and also adds a variable called ENABLED
+ in /etc/default/celeryd.
Author: Michael Fladischer <FladischerMichael at fladi.at>
Last-Update: 2012-01-18
Forwarded: no
@@ -15,24 +16,31 @@
### END INIT INFO
#set -e
-@@ -26,14 +27,9 @@
+@@ -25,16 +26,18 @@
+ DEFAULT_LOG_LEVEL="INFO"
DEFAULT_NODES="celery"
DEFAULT_CELERYD="-m celery.bin.celeryd_detach"
++ENABLED="false"
-# /etc/init.d/celeryd: start and stop the celery task worker daemon.
+[ -r "$CELERY_DEFAULTS" ] && . "$CELERY_DEFAULTS"
-CELERY_DEFAULTS=${CELERY_DEFAULTS:-"/etc/default/celeryd"}
--
++[ -r /etc/default/celeryd ] && . /etc/default/celeryd
+
-test -f "$CELERY_DEFAULTS" && . "$CELERY_DEFAULTS"
-if [ -f "/etc/default/celeryd" ]; then
- . /etc/default/celeryd
--fi
-+[ -r /etc/default/celeryd ] && . /etc/default/celeryd
++if [ "$ENABLED" != "true" ]; then
++ echo "celery daemon disabled - see /etc/default/celeryd."
++ exit 0
+ fi
++
CELERYD_PID_FILE=${CELERYD_PID_FILE:-${CELERYD_PIDFILE:-$DEFAULT_PID_FILE}}
CELERYD_LOG_FILE=${CELERYD_LOG_FILE:-${CELERYD_LOGFILE:-$DEFAULT_LOG_FILE}}
-@@ -126,7 +122,7 @@
+ CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-${CELERYD_LOGLEVEL:-$DEFAULT_LOG_LEVEL}}
+@@ -126,7 +129,7 @@
;;
status)
@@ -66,23 +74,28 @@
### END INIT INFO
# Cannot use set -e/bash -e since the kill -0 command will abort
-@@ -95,13 +96,9 @@
+@@ -94,13 +95,15 @@
+ DEFAULT_LOG_FILE="/var/log/celeryev.log"
DEFAULT_LOG_LEVEL="INFO"
DEFAULT_CELERYEV="/usr/bin/celeryev"
++ENABLED="false"
-if test -f /etc/default/celeryd; then
- . /etc/default/celeryd
-fi
+[ -r /etc/default/celeryd ] && . /etc/default/celeryd
++
++[ -r /etc/default/celeryev ] && . /etc/default/celeryev
-if test -f /etc/default/celeryev; then
- . /etc/default/celeryev
--fi
-+[ -r /etc/default/celeryev ] && . /etc/default/celeryev
++if [ "$ENABLED" != "true" ]; then
++ echo "celeryevcam daemon disabled - see /etc/default/celeryd."
++ exit 0
+ fi
CELERYEV=${CELERYEV:-$DEFAULT_CELERYEV}
- CELERYEV_PID_FILE=${CELERYEV_PID_FILE:-${CELERYEV_PIDFILE:-$DEFAULT_PID_FILE}}
-@@ -197,7 +194,16 @@
+@@ -197,7 +200,16 @@
--pidfile="$CELERYEV_PID_FILE"
}
@@ -100,7 +113,7 @@
case "$1" in
start)
-@@ -216,9 +222,12 @@
+@@ -216,9 +228,12 @@
check_dev_null
start_evcam
;;
@@ -124,9 +137,11 @@
### END INIT INFO
# Cannot use set -e/bash -e since the kill -0 command will abort
-@@ -26,15 +27,9 @@
+@@ -25,15 +26,15 @@
+ DEFAULT_LOG_FILE="/var/log/celerybeat.log"
DEFAULT_LOG_LEVEL="INFO"
DEFAULT_CELERYBEAT="celerybeat"
++ENABLED="false"
-# /etc/init.d/ssh: start and stop the celery task worker daemon.
+[ -r /etc/default/celeryd ] && . /etc/default/celeryd
@@ -134,15 +149,17 @@
-if test -f /etc/default/celeryd; then
- . /etc/default/celeryd
-fi
--
++[ -r /etc/default/celerybeat ] && . /etc/default/celerybeat
+
-if test -f /etc/default/celerybeat; then
- . /etc/default/celerybeat
--fi
-+[ -r /etc/default/celerybeat ] && . /etc/default/celerybeat
++if [ "$ENABLED" != "true" ]; then
++ echo "celerybeat daemon disabled - read /etc/default/celeryd."
++ exit 0
+ fi
CELERYBEAT=${CELERYBEAT:-$DEFAULT_CELERYBEAT}
- CELERYBEAT_PID_FILE=${CELERYBEAT_PID_FILE:-${CELERYBEAT_PIDFILE:-$DEFAULT_PID_FILE}}
-@@ -125,7 +120,16 @@
+@@ -125,7 +126,16 @@
--pidfile="$CELERYBEAT_PID_FILE"
}
@@ -160,7 +177,7 @@
case "$1" in
start)
-@@ -144,9 +148,12 @@
+@@ -144,9 +154,12 @@
check_dev_null
start_beat
;;
Copied: packages/celery/trunk/debian/python-celery.celeryd.default (from rev 20049, packages/celery/trunk/debian/python-celery.default)
===================================================================
--- packages/celery/trunk/debian/python-celery.celeryd.default (rev 0)
+++ packages/celery/trunk/debian/python-celery.celeryd.default 2012-02-27 13:29:44 UTC (rev 20604)
@@ -0,0 +1,35 @@
+# Edit the options in this file to match your projects environment.
+# See http://ask.github.com/celery/cookbook/daemonizing.html for the complete
+# documentation on the options.
+
+# WARNING: This script is only designed to run the worker(s) for a single
+# project. If you need to start workers for multiple projects you should
+# consider using supervisor.
+# Examples can be found in /usr/share/doc/python-celery/supervisord/
+
+# Change this to true when done to enable the init.d script.
+# Default: false
+ENABLED="false"
+
+# Name of nodes to start
+# here we have a single node
+CELERYD_NODES="w1"
+# or we could have three nodes:
+#CELERYD_NODES="w1 w2 w3"
+
+# Where to chdir at start.
+CELERYD_CHDIR="/opt/Myproject/"
+
+# Extra arguments to celeryd
+CELERYD_OPTS="--time-limit=300 --concurrency=8"
+
+# Name of the celery config module.
+CELERY_CONFIG_MODULE="celeryconfig"
+
+# %n will be replaced with the nodename.
+CELERYD_LOG_FILE="/var/log/celery/%n.log"
+CELERYD_PID_FILE="/var/run/celery/%n.pid"
+
+# Workers should run as an unprivileged user.
+CELERYD_USER="celery"
+CELERYD_GROUP="celery"
Deleted: packages/celery/trunk/debian/python-celery.default
===================================================================
--- packages/celery/trunk/debian/python-celery.default 2012-02-27 06:58:06 UTC (rev 20603)
+++ packages/celery/trunk/debian/python-celery.default 2012-02-27 13:29:44 UTC (rev 20604)
@@ -1,35 +0,0 @@
-# Edit the options in this file to match your projects environment.
-# See http://ask.github.com/celery/cookbook/daemonizing.html for the complete
-# documentation on the options.
-
-# WARNING: This script is only designed to run the worker(s) for a single
-# project. If you need to start workers for multiple projects you should
-# consider using supervisor.
-# Examples can be found in /usr/share/doc/python-celery/supervisord/
-
-# Change this to true when done to enable the init.d script.
-# Default: false
-ENABLED=false
-
-# Name of nodes to start
-# here we have a single node
-CELERYD_NODES="w1"
-# or we could have three nodes:
-#CELERYD_NODES="w1 w2 w3"
-
-# Where to chdir at start.
-CELERYD_CHDIR="/opt/Myproject/"
-
-# Extra arguments to celeryd
-CELERYD_OPTS="--time-limit=300 --concurrency=8"
-
-# Name of the celery config module.
-CELERY_CONFIG_MODULE="celeryconfig"
-
-# %n will be replaced with the nodename.
-CELERYD_LOG_FILE="/var/log/celery/%n.log"
-CELERYD_PID_FILE="/var/run/celery/%n.pid"
-
-# Workers should run as an unprivileged user.
-CELERYD_USER="celery"
-CELERYD_GROUP="celery"
Modified: packages/celery/trunk/debian/rules
===================================================================
--- packages/celery/trunk/debian/rules 2012-02-27 06:58:06 UTC (rev 20603)
+++ packages/celery/trunk/debian/rules 2012-02-27 13:29:44 UTC (rev 20604)
@@ -43,3 +43,4 @@
dh_installinit --name celerybeat
dh_installinit --name celeryd
dh_installinit --name celeryevcam
+ dh_installinit --name celery
More information about the Python-modules-commits
mailing list