#! /bin/sh ### BEGIN INIT INFO # Provides: solar-celery # Required-Start: $syslog # Required-Stop: $syslog # Should-Start: $local_fs # Should-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO export SOLAR_CONFIG_OVERRIDE=/.solar_config_override START="$(/usr/local/bin/celery multi start 2 -A solar.orchestration.runner -P gevent -c:1 1 -c:2 1000 -Q:1 scheduler,system_log -Q:2 celery --pidfile=/var/run/celery/%N.pid --logfile=/var/run/celery/%N.log)" STOP="$(/usr/local/bin/celery multi stopwait 2 --pidfile=/var/run/celery/%N.pid)" NAME=solar-celery case "$1" in start) "{$START}" ;; stop) "{$STOP}" ;; restart|force-reload) ${0} stop ${0} start ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0