Browse Source

fix systemd example file (fixes #2131)

Arthur Vuillard 9 years ago
parent
commit
0f0c930662
1 changed files with 8 additions and 9 deletions
  1. 8 9
      extra/systemd/celery.service

+ 8 - 9
extra/systemd/celery.service

@@ -7,15 +7,14 @@ Type=forking
 User=celery
 Group=celery
 EnvironmentFile=-/etc/conf.d/celery
-WorkingDirectory=/opt/myproject/
-ExecStart=${CELERY_BIN} multi start $CELERYD_NODES -A \
-	$CELERY_APP -logfile=${CELERYD_LOG_FILE} \
-	--pidfile=${CELERYD_PID_FILE} $CELERYD_OPTS
-ExecStop=${CELERY_BIN} multi stopwait $CELERYD_NODES \
-	--pidfile=${CELERYD_PID_FILE}
-ExecReload=${CELERY_BIN} multi restart $CELERYD_NODES -A \
-	$CELERY_APP --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} \
-	--loglevel="${CELERYD_LOG_LEVEL}" $CELERYD_OPTS
+ExecStart=/bin/sh '${CELERY_BIN} multi start $CELERYD_NODES \
+	-A $CELERY_APP --logfile=${CELERYD_LOG_FILE} \
+	--pidfile=${CELERYD_PID_FILE} $CELERYD_OPTS'
+ExecStop=/bin/sh '${CELERY_BIN} multi stopwait $CELERYD_NODES \
+	--pidfile=${CELERYD_PID_FILE}'
+ExecReload=/bin/sh '${CELERY_BIN} multi restart $CELERYD_NODES \
+	-A $CELERY_APP --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} \
+	--loglevel="${CELERYD_LOG_LEVEL}" $CELERYD_OPTS'
 
 [Install]
 WantedBy=multi-user.target