adding all of botlist, initial add
[botlist.git] / botlistprojects / botgems_remote / bin / bot_remote_local.sh
blob0afa6b1789607361ae7ab9fed33e1108c77bb47e
1 #!/bin/sh
3 # bot remote sync.sh
4 # Depending on if we are running from pwd or not, determine
5 # proper location to change directory to.
6 case $0 in
7 /*)
8 ABS_APP_PATH=$0
9 ABS_CONF=`dirname $ABS_APP_PATH`
10 ABS_CONF=`dirname $ABS_CONF`
12 bin*)
13 ABS_APP_PATH=`pwd`
14 ABS_CONF=$ABS_APP_PATH
16 *)
17 ABS_APP_PATH=`pwd`
18 ABS_CONF=`dirname $ABS_APP_PATH`
19 ;;
20 esac
21 if [ -z "$JAVA_HOME" ] ; then
22 JAVA_HOME=/usr
25 JAVA=$JAVA_HOME/bin/java
27 BOTBERT_HOME=$ABS_CONF
28 # The botlist projects directory contains the system library (jruby)
29 PROJECTS_HOME=`dirname $BOTBERT_HOME`
30 TOPDIR=$BOTBERT_HOME
32 # Use the top project directory to include the correct CP config functions
33 . ${TOPDIR}/bin/conf_remote_funcs.sh
36 cd $BOTBERT_HOME
38 echo "-----------------------"
39 echo "running in directory=${BOTBERT_HOME}"
40 echo $LIN_CPBOTBERT
41 echo "-----------------------"
43 # Append '&' to run in background
44 # Append -Xmx32M heap settings if needed
45 URL1="http://127.0.0.1:8080/botlist/lift/pipes/types/remote_agent_req"
46 URL2="http://127.0.0.1:8080/botlist/lift/pipes/types/remote_agent_send"
47 "$JAVA" -classpath $LIN_CPBOTBERT $APP_MAIN ruby/bot_remote_sync.rb ${URL1} ${URL2} $@
49 # Write the process id
50 echo $! > $BOTBERT_HOME/bin/botremotesync.pid
52 # End of Script --