22.02.2016, 07:16
Hallo zusammen ;D
Hab hier noch ein StartScript für OpenSim gefunden, nicht von mir getestet ...
[*]
Quelle: http://www.3dgrid.de/index.php/tech/78-opensim-start
Hab hier noch ein StartScript für OpenSim gefunden, nicht von mir getestet ...
Code:
#!/bin/bash
#
# for usage, run without arguments
#
# see ../README for setup instructions.
#
# Original code by Dave Coyle (http://coyled.com)
# Tweaks by Gwyneth Llewelyn (http://gwynethllewelyn.net/)
# Requires bash 4
# The original script assumed that you‘d be running one sim per instance,
# and launch a different script per sim.
# These changes assume you have multiple instances with multiple sims,
# and that instance names are launched all from the same place with
# an unique identification for each
# List of valid instances. Make sure you add all of your instances here
declare -A instances
for index in <Region 1> <Region 2> <Region x>
do
instances[$index]=1
done
show_help() {
echo "Input: opensim {start|stop|open|restart|console} "
echo -n " for following Regions: "
echo ${!instances[*]}
}
# Change <opensim_user> with your valid opensim user
check_user() {
if [ $USER != '<opensim_user>' ]; then
echo "Only <opensim_user> is allowed to use the script"
exit 1
fi
}
setup() {
if [ ! $1 ]; then
show_help
exit 1
else
SIM=$1
fi
# Change the directories inline with your installation directories
# The pid_dir must be set to the value, you used in OpenSim.exe.config
# within your regions path
if [[ ${instances[$SIM]} ]]; then
MONO="mono"
OPENSIM_DIR="/put/your/opensim_dir/here"
PID="$OPENSIM_DIR/put/your/pid_dir/here${SIM}/${SIM}.pid"
SCREEN="screen"
GRID_DIR="./<grid_dir>"
# set GRID_DIR to the subdirectory where your individual
# instance configuration is
else
echo "Region ${SIM} is unknown. Exit."
exit 1;
fi
}
do_start() {
if [ ! $1 ]; then
show_help
exit 1
else
SIM=$1
fi
setup $SIM
check_user
cd ${OPENSIM_DIR}/bin && $SCREEN -S $SIM -d -m -l $MONO OpenSim.exe -hypergrid=true -inidirectory="$GRID_DIR/$SIM" -logconfig="$GRID_DIR/$SIM/OpenSim.exe.config"
}
do_kill() {
if [ ! $1 ]; then
show_help
exit 1
else
SIM=$1
fi
setup $SIM
check_user
if [ -f $PID ]; then
kill -9 `cat $PID`
else
echo "Region ${SIM} PID not found."
exit 1
fi
}
do_console() {
if [ ! $1 ]; then
show_help
exit 1
fi
setup $1
cd ${OPENSIM_DIR}/bin && $SCREEN -S $SIM -d -m -l $MONO OpenSim.exe -hypergrid=true -inidirectory="$GRID_DIR/$SIM" -logconfig="$GRID_DIR/$SIM/OpenSim.exe.config"
}
do_open() {
if [ ! $1 ]; then
show_help
exit 1
else
SIM=$1
fi
setup $SIM
check_user
if [ -f $PID ]; then
screen -r $SIM
else
echo "Region ${SIM} PID not found."
exit 1
fi
}
case "$1" in
start)
do_start $2
;;
stop)
do_kill $2
;;
open)
do_open $2
;;
kill)
do_kill $2
;;
restart)
do_kill $2
do_start $2
;;
console)
do_console $2
;;
*)
show_help
exit
;;
esac
Quelle: http://www.3dgrid.de/index.php/tech/78-opensim-start
Signatur
Have a nice Day ;D
>> BogusMusikRausch alle 14 Tage an einem Donnerstag, um 20 Uhr in Uwes KeulenBar
Tschöö
Bogus | MagicPlace.de | M: @gse@norden.social
Have a nice Day ;D
>> BogusMusikRausch alle 14 Tage an einem Donnerstag, um 20 Uhr in Uwes KeulenBar
Tschöö
Bogus | MagicPlace.de | M: @gse@norden.social