aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/start-sim-in-rest
diff options
context:
space:
mode:
Diffstat (limited to 'start-sim-in-rest')
-rwxr-xr-xstart-sim-in-rest43
1 files changed, 43 insertions, 0 deletions
diff --git a/start-sim-in-rest b/start-sim-in-rest
new file mode 100755
index 0000000..d6aac2c
--- /dev/null
+++ b/start-sim-in-rest
@@ -0,0 +1,43 @@
1#!/bin/bash
2
3osversion="current"
4NeedARest=" -console=rest"
5NeedARest=""
6
7if [ x$1 = x ]; then
8 pathname=$(pwd)
9 tgt=$(basename $pathname)
10elif [ -d ./$1 ]; then
11 tgt=$1
12elif [ -d ./sim$1 ]; then
13 tgt=sim$1
14fi
15
16if [ x$tgt = x ]; then
17 echo "usage:"
18 echo " $ start-sim-in-rest <sim>"
19 echo "where <sim> is one of: " robust sim[0-9][0-9]
20 exit 1
21fi
22
23inidir=/opt/opensim/config/${tgt}
24bindir=/opt/opensim/${osversion}/bin
25if [ x$tgt = xrobust ]; then
26 exe="Robust"
27else
28 exe="OpenSim"
29fi
30
31if [ ! -e /var/run/opensim/${tgt} ]
32then
33 cd ${bindir}
34 /usr/bin/mono ${exe}.exe -inidirectory=${inidir} -logconfig=${inidir}/${exe}.exe.config $NeedARest
35fi
36
37if [ "x$NeedARest" = x }
38then
39 echo "Starting rest client."
40 cd ${inidir}
41 /usr/bin/mono ${bindir}/OpenSim.ConsoleClient.exe -logconfig=${inidir}/${exe}.exe.config
42fi
43