#!/bin/sh export PYTHONPATH=%%PYTHON_LIBDIR%%:%%PYTHON_SITELIBDIR%%/exaddos:%%PYTHON_SITELIBDIR%%/exaddos/lib INTERPRETER=%%PYTHON_CMD%% APPLICATIONS=`$INTERPRETER -c "import sys,os; print ' '.join(os.path.join(_,'exaddos','application.py') for _ in sys.path if os.path.isfile('/'.join((_,'exaddos','application.py'))))"` APPLICATION=`echo $APPLICATIONS | awk '{ print $1; }'` if [ $# -eq 0 ]; then $INTERPRETER -m exaddos.debug $APPLICATION -c %%PREFIX%%/etc/exaddos.conf --help echo "===> To start exaddos, you should use:" echo "===> service exaddos start" else exec $INTERPRETER -m exaddos.debug $APPLICATION -c %%PREFIX%%/etc/exaddos.conf $* fi