diff options
author | David Walter Seikel | 2012-02-07 01:46:25 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-02-07 01:46:25 +1000 |
commit | fd0c74b2996ef03c6e991b680108722daf6efbdd (patch) | |
tree | c240b49b2a59c4541fa37c5a128e9163c73b0fd6 | |
parent | Double check if the sim is REALLY running. (diff) | |
download | IGnoble-fd0c74b2996ef03c6e991b680108722daf6efbdd.zip IGnoble-fd0c74b2996ef03c6e991b680108722daf6efbdd.tar.gz IGnoble-fd0c74b2996ef03c6e991b680108722daf6efbdd.tar.bz2 IGnoble-fd0c74b2996ef03c6e991b680108722daf6efbdd.tar.xz |
Properly check if the sim is running, not that untested shit I did last time. lol
-rwxr-xr-x | start-sim | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -75,14 +75,18 @@ case $(basename $0) in | |||
75 | cmd="/usr/bin/mono ${bindir}/${exe}.exe -inidirectory=${inidir} -logconfig=${inidir}/${exe}.exe.config ${roboini}" | 75 | cmd="/usr/bin/mono ${bindir}/${exe}.exe -inidirectory=${inidir} -logconfig=${inidir}/${exe}.exe.config ${roboini}" |
76 | 76 | ||
77 | # Check if it's already running. | 77 | # Check if it's already running. |
78 | if [ ! -e /var/run/opensim/${tgt}.pid ] | 78 | if [ -e /var/run/opensim/${tgt}.pid ] |
79 | then | 79 | then |
80 | # Double check if it's REALLY running. | 80 | # Double check if it's REALLY running. |
81 | if [ "x$(ps -p $(cat /var/run/opensim/sim90.pid) --no-headers -o comm)" = "x" ]; then | 81 | if [ "x$(ps -p $(cat /var/run/opensim/sim90.pid) --no-headers -o comm)" = "x" ]; then |
82 | $SUDO rm -f /var/run/opensim/${tgt}.pid | 82 | $SUDO rm -f /var/run/opensim/${tgt}.pid |
83 | ${screen_command} new-window -dn "[${title}]" -t "${screen_session}" "${cmd}" | ||
84 | fi | 83 | fi |
85 | fi | 84 | fi |
85 | # Now see if it's running. lol | ||
86 | if [ ! -e /var/run/opensim/${tgt}.pid ] | ||
87 | then | ||
88 | ${screen_command} new-window -dn "[${title}]" -t "${screen_session}" "${cmd}" | ||
89 | fi | ||
86 | ;& | 90 | ;& |
87 | 91 | ||
88 | "sim-console") | 92 | "sim-console") |