A simple couple of scripts for starting components of OpenSimulator. This is an alternative to the /etc/init.d script found elsewhere in this repository.
These scripts work using screen instances.
It would be possible to make these scripts much more sophisticated (e.g. automatic detection of whether the grid services are running before starting a simulator, etc.).
However, currently they are deliberately being kept simple in order to keep the user close to what is really happening. This is to facilitate debugging and the ability to deal with the many possible failure conditions. This might change in the future.
- Copy src/* to a location of your choice
- If you are using a Python earlier than 2.7m you will need to copy argparse.py  into the same location.
Before use, you will need to copy config.py.example to config.py and configure it for your OpenSimulator installation.
There are also some optional configuration parameters in simctrl.py and robustctrl.py though you wouldn't normally need to edit these. These control the name of the screen used, whether mono is started with the --debug switch, etc.
simctrl.py controls a simulator instance whilst robustctrl.py can control a Robust grid service instance.
If the OpenSimulator installation is in standalone mode then it can be controlled purely with the simctrl.py script.
Both these scripts provide a number of commands to control their components. These are
start - start an instance of the component. stop - stop the component if it is running. restart - restart the component if it is running. attach - attach to the current screen instance of the component if it is running. status - get the current status of the component.
There are also a few optional switches
Only valid for start and restart commands. If set then osimctrl automatically attaches you to the screen of the [re]started component.
If a component fails, then automatically restart it. If you use this option then you can only stop the component with the stop command instead of manually attaching to the screen and shutting it down (since the surrounding loop will simply start it again). Alternatively, you can send the signal SIGUSR1 to the bash script which acts as the simple loop. This will be a child process from the screen instance).
If set then osimctrl prints out each command that it executes and other information.
Useful for debugging
Display usage text
It provides start, stop, restart, attach and status commands, along with --noattach and --autorestart options
These files control a robust instance and a simulator respectively.
Because stop currently involves stuff text onto the screen buffer, this will fail if there is something already there.