Files
galaxy/run.sh
T

28 lines
856 B
Bash
Executable File

#!/bin/sh
cd `dirname $0`
python ./scripts/check_python.py
[ $? -ne 0 ] && exit 1
./scripts/common_startup.sh
if [ -n "$GALAXY_UNIVERSE_CONFIG_DIR" ]; then
python ./scripts/build_universe_config.py "$GALAXY_UNIVERSE_CONFIG_DIR"
fi
if [ -n "$GALAXY_RUN_ALL" ]; then
servers=`sed -n 's/^\[server:\(.*\)\]/\1/ p' universe_wsgi.ini | xargs echo`
daemon=`echo "$@" | grep -q daemon`
if [ $? -ne 0 ]; then
echo 'ERROR: $GALAXY_RUN_ALL cannot be used without the `--daemon` or `--stop-daemon` arguments to run.sh'
exit 1
fi
for server in $servers; do
echo "Handling $server with log file $server.log..."
python ./scripts/paster.py serve universe_wsgi.ini --server-name=$server --pid-file=$server.pid --log-file=$server.log $@
done
else
python ./scripts/paster.py serve universe_wsgi.ini $@
fi