Skip to content

Commit

Permalink
Only do ulimit on real linux, warn for issue #7 problem
Browse files Browse the repository at this point in the history
  • Loading branch information
lickx committed Aug 14, 2024
1 parent 22afe66 commit bb9b48b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
12 changes: 12 additions & 0 deletions bin/robust
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ do_start() {
exit
fi

if [ -n "${WSL_DISTRO_NAME}" ]; then
# Warn issue #7 on WSL - https://github.com/lickx/isthmus/issues/7
VAR_SCREEN="/var/run/screen"
if [ ! -w ${VAR_SCREEN} ]; then
echo "${VAR_SCREEN} should exist and have rwx perms. Try:"
echo " sudo mkdir ${VAR_SCREEN}"
echo " sudo chmod 777 ${VAR_SCREEN}"
echo "Exiting."
exit
fi
fi

export DOTNET_CLI_TELEMETRY_OPTOUT=1
export LC_ALL=C
ulimit -n 4096
Expand Down
17 changes: 16 additions & 1 deletion bin/simctl
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ do_start() {
exit
fi

if [ -n "${WSL_DISTRO_NAME}" ]; then
# Warn issue #7 on WSL - https://github.com/lickx/isthmus/issues/7
VAR_SCREEN="/var/run/screen"
if [ ! -w ${VAR_SCREEN} ]; then
echo "${VAR_SCREEN} should exist and have rwx perms. Try:"
echo " sudo mkdir ${VAR_SCREEN}"
echo " sudo chmod 777 ${VAR_SCREEN}"
echo "Exiting."
exit
fi
fi

if [ -d "${OPENSIM_DIR}/etc/robust.d" ]; then
# This isthmus also has robusts configured, check if (any) running
${OPENSIM_DIR}/bin/robust status | grep online > /dev/null
Expand All @@ -209,7 +221,10 @@ do_start() {

export DOTNET_CLI_TELEMETRY_OPTOUT=1
export LC_ALL=C
ulimit -n 4096 -s 1048576
if [ -z "${WSL_DISTRO_NAME}" ]; then
# Only do this in a real linux environment
ulimit -n 4096 -s 1048576
fi
cd "${OPENSIM_DIR}/runtime/bin" && screen -S ${SIM} -d -m -l \
dotnet ./OpenSim.dll \
-inifile="${OPENSIM_DIR}/share/system/opensim.ini" \
Expand Down

0 comments on commit bb9b48b

Please sign in to comment.