From 3a0bf4fa9f25c11cfa5ab7dc6dd1c82e053bce3f Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 20 Apr 2020 23:24:11 +1000 Subject: The example "start a single sim" script also updated. --- example/start.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'example') diff --git a/example/start.sh b/example/start.sh index d6ef48d..c479f78 100755 --- a/example/start.sh +++ b/example/start.sh @@ -1,4 +1,16 @@ #!/bin/bash cd /opt/opensim_SC/current/bin -mono OpenSim.exe -inidirectory=../../config/simg01 + +source ../../common.sh + +USER=$(whoami) + +if [ $USER = "${OS_USER}" ] +then + SUDO="" +else + SUDO="sudo -Hu ${OS_USER}" +fi + +${SUDO} mono OpenSim.exe -inidirectory=../../config/sim01 -- cgit v1.1