X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fopensim%2Fopensim_utils.sh;h=9405ba6fca8f3d24b5bf25284678413da002170a;hb=1a36c2a572972cf95f00bb84c32a51b5693ccb1a;hp=2065886bb5fee9c9053bd482b057421e4da752b8;hpb=66da892f0eed57eafaa9fd265ed49162f2a645c9;p=feisty_meow.git diff --git a/scripts/opensim/opensim_utils.sh b/scripts/opensim/opensim_utils.sh index 2065886b..9405ba6f 100644 --- a/scripts/opensim/opensim_utils.sh +++ b/scripts/opensim/opensim_utils.sh @@ -2,6 +2,8 @@ # this is a collection of scripts that assist in managing an opensim server. # it uses the "screen" utility to manage opensimulator instances. +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" + # set up some parameters that we believe (or have been told) are beneficial. export MONO_THREADS_PER_CPU=408 @@ -15,7 +17,7 @@ export LANG=C # this is used as a process startup snooze, to avoid running a dependent # process before the dependency has really started. -export SNOOZE_TIME=7 +export SNOOZE_TIME=6 # lock the limit in for threads, so we don't have any getting out of control. # also make sure we've provided enough space for each thread. @@ -33,11 +35,11 @@ function launch_screen() { screen_name="$1"; shift app_name="$1"; shift - echo "$(date_stringer): starting $screen_name now..." + echo "$(date_stringer ' '): starting $screen_name now..." screen -L -S "$screen_name" -d -m nice -n $NICENESS_LEVEL mono "$app_name" ##why? --debug #-console=basic - echo "$(date_stringer): $screen_name started." + echo "$(date_stringer ' '): $screen_name started." sleep $SNOOZE_TIME } @@ -60,13 +62,13 @@ function close_application() { screen_name="$1"; shift process_name="$1"; shift - echo "$(date_stringer): stopping $screen_name now..." + echo "$(date_stringer ' '): stopping $screen_name now..." screen -r -s "$screen_name" -X quit # we don't want to shut any other servers down until this process is really gone. find_opensim_process $process_name if [ ! -z "$OS_PROC_ID" ]; then - echo "$(date_stringer): waiting for $screen_name to really shut down..." + echo "$(date_stringer ' '): waiting for $screen_name to really shut down..." sleep $SNOOZE_TIME # check again after the snooze. find_opensim_process $process_name @@ -74,7 +76,7 @@ function close_application() find_opensim_process $process_name #break out on timed basis. done - echo "$(date_stringer): $screen_name really is shut down now." + echo "$(date_stringer ' '): $screen_name really is shut down now." #do this as last ditch, above in timeout find_opensim_process $process_name @@ -86,6 +88,6 @@ function close_application() fi - echo "$(date_stringer): $screen_name stopped." + echo "$(date_stringer ' '): $screen_name stopped." }