소스 검색

Honours the DJANGO_SETTINGS_MODULE configuration variable in the debian init.d scripts so that the --settings parameter is appended to any manage.py calls.

Martin Galpin 14 년 전
부모
커밋
514eda40d2
3개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      contrib/debian/init.d/celerybeat
  2. 5 0
      contrib/debian/init.d/celeryd
  3. 5 0
      contrib/debian/init.d/celeryevcam

+ 5 - 0
contrib/debian/init.d/celerybeat

@@ -110,6 +110,11 @@ if [ -n "$2" ]; then
     CELERYBEAT_OPTS="$CELERYBEAT_OPTS $2"
 fi
 
+# Append the Django settings module to use, if specified
+if [ -n "$DJANGO_SETTINGS_MODULE" ]; then
+    CELERYBEAT_OPTS="$CELERYBEAT_OPTS --settings=$DJANGO_SETTINGS_MODULE"
+fi
+
 # Extra start-stop-daemon options, like user/group.
 if [ -n "$CELERYBEAT_USER" ]; then
     DAEMON_OPTS="$DAEMON_OPTS --chuid $CELERYBEAT_USER"

+ 5 - 0
contrib/debian/init.d/celeryd

@@ -106,6 +106,11 @@ if [ -n "$2" ]; then
     CELERYD_OPTS="$CELERYD_OPTS $2"
 fi
 
+# Append the Django settings module to use, if specified
+if [ -n "$DJANGO_SETTINGS_MODULE" ]; then
+    CELERYD_OPTS="$CELERYD_OPTS --settings=$DJANGO_SETTINGS_MODULE"
+fi
+
 # Extra start-stop-daemon options, like user/group.
 if [ -n "$CELERYD_USER" ]; then
     DAEMON_OPTS="$DAEMON_OPTS --chuid $CELERYD_USER"

+ 5 - 0
contrib/debian/init.d/celeryevcam

@@ -123,6 +123,11 @@ if [ -n "$2" ]; then
     CELERYEV_OPTS="$CELERYEV_OPTS $2"
 fi
 
+# Append the Django settings module to use, if specified
+if [ -n "$DJANGO_SETTINGS_MODULE" ]; then
+    CELERYEV_OPTS="$CELERYEV_OPTS --settings=$DJANGO_SETTINGS_MODULE"
+fi
+
 # Extra start-stop-daemon options, like user/group.
 if [ -n "$CELERYEV_USER" ]; then
     DAEMON_OPTS="$DAEMON_OPTS --chuid $CELERYEV_USER"