2008-12-15 11:40:12 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
action="$1"
|
|
|
|
|
|
|
|
if test -z "$HYDRA_DATA"; then
|
|
|
|
echo "Error: \$HYDRA_DATA is not set";
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$action" = "start"; then
|
|
|
|
|
2011-12-02 14:58:26 +00:00
|
|
|
hydra-server > $HYDRA_DATA/server.log 2>&1 &
|
2008-12-15 11:40:12 +00:00
|
|
|
echo $! > $HYDRA_DATA/server.pid
|
|
|
|
|
2011-12-02 14:58:26 +00:00
|
|
|
hydra-evaluator > $HYDRA_DATA/evaluator.log 2>&1 &
|
2010-05-11 11:10:03 +00:00
|
|
|
echo $! > $HYDRA_DATA/evaluator.pid
|
2008-12-15 11:40:12 +00:00
|
|
|
|
2011-12-02 14:58:26 +00:00
|
|
|
hydra-queue-runner > $HYDRA_DATA/queue-runner.log 2>&1 &
|
2008-12-15 11:40:12 +00:00
|
|
|
echo $! > $HYDRA_DATA/queue_runner.pid
|
|
|
|
|
|
|
|
elif test "$action" = "stop"; then
|
|
|
|
|
|
|
|
kill $(cat $HYDRA_DATA/server.pid)
|
2010-05-11 11:10:03 +00:00
|
|
|
kill $(cat $HYDRA_DATA/evaluator.pid)
|
2008-12-15 11:40:12 +00:00
|
|
|
kill $(cat $HYDRA_DATA/queue_runner.pid)
|
|
|
|
|
|
|
|
elif test "$action" = "status"; then
|
|
|
|
|
|
|
|
echo -n "Hydra web server... "
|
|
|
|
(kill -0 $(cat $HYDRA_DATA/server.pid) 2> /dev/null && echo "ok") || echo "not running"
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2010-05-11 11:10:03 +00:00
|
|
|
echo -n "Hydra evaluator... "
|
|
|
|
(kill -0 $(cat $HYDRA_DATA/evaluator.pid) 2> /dev/null && echo "ok") || echo "not running"
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2008-12-15 11:40:12 +00:00
|
|
|
echo -n "Hydra queue runner... "
|
|
|
|
(kill -0 $(cat $HYDRA_DATA/queue_runner.pid) 2> /dev/null && echo "ok") || echo "not running"
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2008-12-15 11:40:12 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
echo "Syntax: $0 [start|stop|status]"
|
|
|
|
exit 1
|
|
|
|
fi
|