diff options
Diffstat (limited to 'scripts/start-sim')
-rwxr-xr-x | scripts/start-sim | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/start-sim b/scripts/start-sim index bd0815f..e82547a 100755 --- a/scripts/start-sim +++ b/scripts/start-sim | |||
@@ -38,11 +38,11 @@ fi | |||
38 | if [ "x$1" = "x" ]; then | 38 | if [ "x$1" = "x" ]; then |
39 | tgt=$(basename $(pwd)) | 39 | tgt=$(basename $(pwd)) |
40 | num="$(echo ${tgt} | cut -c 4-)" | 40 | num="$(echo ${tgt} | cut -c 4-)" |
41 | elif [ -d "./$1" ]; then | 41 | elif [ -d "$1" ]; then |
42 | tgt=$1 | 42 | tgt=$1 |
43 | elif [ -d "./sim$1" ]; then | 43 | elif [ -d "sim$1" ]; then |
44 | num=$1 | 44 | num=$1 |
45 | tgt="./sim${num}" | 45 | tgt="sim${num}" |
46 | else | 46 | else |
47 | tgt=$1 | 47 | tgt=$1 |
48 | inventory=$1 | 48 | inventory=$1 |
@@ -77,14 +77,14 @@ fi | |||
77 | 77 | ||
78 | case $(basename $0) in | 78 | case $(basename $0) in |
79 | "start-sim") | 79 | "start-sim") |
80 | cmd="mono ${exe}.exe -inidirectory=${tgt} " | 80 | cmd="mono ${exe}.exe -inidirectory=../../config/${tgt} " |
81 | 81 | ||
82 | # Check if it's already running. | 82 | # Check if it's already running. |
83 | if [ -e /var/run/opensim/${tgt}.pid ] | 83 | if [ -e /var/run/opensim/${tgt}.pid ] |
84 | then | 84 | then |
85 | # Double check if it's REALLY running. | 85 | # Double check if it's REALLY running. |
86 | if [ "x$(ps -p $(cat /var/run/opensim/${tgt}.pid) --no-headers -o comm)" = "x" ]; then | 86 | if [ "x$(ps -p $(cat ${PRGDIR}/../../caches/${tgt}.pid) --no-headers -o comm)" = "x" ]; then |
87 | $SUDO rm -f /var/run/opensim/${tgt}.pid | 87 | $SUDO rm -f ${PRGDIR}/../../caches/${tgt}.pid |
88 | fi | 88 | fi |
89 | fi | 89 | fi |
90 | # Now see if it's really really running. lol | 90 | # Now see if it's really really running. lol |
@@ -92,9 +92,9 @@ case $(basename $0) in | |||
92 | then | 92 | then |
93 | if [ "x$tgt" = "xROBUST" ]; then | 93 | if [ "x$tgt" = "xROBUST" ]; then |
94 | # TODO - the problem here is that the > bit is executed as onefang, not as opensim. | 94 | # TODO - the problem here is that the > bit is executed as onefang, not as opensim. |
95 | $SUDO cat ../config/config.ini ../config/Robust.ini.template >../config/Robust.ini | 95 | $SUDO cat ${PRGDIR}/../../config/config.ini ${PRGDIR}/../../config/Robust.ini.template >${PRGDIR}/../../config/Robust.ini |
96 | # $SUDO chown -R opensim:opensim ../config/Robust.ini | 96 | # $SUDO chown -R opensim:opensim ${PRGDIR}/../../config/Robust.ini |
97 | chmod 640 ../config/Robust.ini | 97 | chmod 640 ${PRGDIR}/../../config/Robust.ini |
98 | ${tmux_command} split-window -hp 50 -t "${tmux_session}:" "${cmd}" | 98 | ${tmux_command} split-window -hp 50 -t "${tmux_session}:" "${cmd}" |
99 | else | 99 | else |
100 | ${tmux_command} new-window -dn "${title}" -t "${tmux_session}:${num}" "${cmd}" | 100 | ${tmux_command} new-window -dn "${title}" -t "${tmux_session}:${num}" "${cmd}" |