compass-core/bin/compassd
xiaodongwang 9a51828a87 make our utility script switch to virtual env before running.
Change-Id: I76a214a81e72d08b3d00704b78e92b450943ddc4
2014-09-05 13:16:47 -07:00

44 lines
831 B
Bash
Executable File

#!/bin/sh
RETVAL_CELERY=0
RETVAL_PROGRESS_UPDATE=0
start() {
service compass-celeryd start
RETVAL_CELERY=$?
service compass-progress-updated start
RETVAL_PROGRESS_UPDATE=$?
}
stop() {
service compass-celeryd stop
RETVAL_CELERY=$?
service compass-progress-updated stop
RETVAL_PROGRESS_UPDATE=$?
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
$1
;;
status)
service compass-celeryd status
RETVAL_CELERY=$?
service compass-progress-updated status
RETVAL_PROGRESS_UPDATE=$?
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
if [[ "$RETVAL_CELERY" != "0" ]]; then
exit $RETVAL_CELERY
fi
if [[ "$RETVAL_PROGRESS_UPDATE" != "0" ]]; then
exit $RETVAL_PROGRESS_UPDATE
fi