#!/bin/sh # Copyright (C) 2008 optivo GmbH # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Start the proxy. # # @author $Author$ # @release $Date$ $Rev$ HSCALE_HOME="$(pwd dirname $0)/.." MYSQL_PROXY_HOME="$(pwd dirname $0)/../../../../mysql-proxy" LUA_PATH="/usr/local/share/lua/5.1/?.lua;/usr/share/lua/5.1/?.lua;${LUA_PATH}" LUA_PATH="${HSCALE_HOME}/src/?.lua;${MYSQL_PROXY_HOME}/lib/?.lua;${LUA_PATH}" LUA_CPATH="/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so;${LUA_CPATH}" LOG4LUA_CONFIG_FILE="$(pwd dirname $0)/log4lua.lua" HSCALE_CONFIG_FILE="$(pwd dirname $0)/hscale.lua" echo "HSCALE_HOME: ${HSCALE_HOME}" echo "HSCALE_CONFIG_FILE: ${HSCALE_CONFIG_FILE}" echo "LOG4LUA_CONFIG_FILE: ${LOG4LUA_CONFIG_FILE}" echo "MYSQL_PROXY_HOME: ${MYSQL_PROXY_HOME}" echo "LUA_PATH: ${LUA_PATH}" export LUA_PATH export LUA_CPATH export LOG4LUA_CONFIG_FILE export HSCALE_CONFIG_FILE ${MYSQL_PROXY_HOME}/src/mysql-proxy \ --plugin-dir=${MYSQL_PROXY_HOME}/plugins \ --proxy-backend-addresses=127.0.0.1:7001 \ --proxy-backend-addresses=127.0.0.1:7002 \ --proxy-backend-addresses=127.0.0.1:7003 \ --proxy-lua-script=${HSCALE_HOME}/src/optivo/hscale/main.lua