Startup script linux

= /etc/init.d script for Linux =

Instructions
Tested on Debian 5. CHUIDS user to opensim user. Supports: start, stop, restart, status

To implement: Type: cat &gt; /etc/init.d/opensim Paste in script from this page Press: CTRL+D Type: chmod +x /etc/init.d/opensim Script should now be located on server and be executable.

Modify header in script to adapt it to your installation folder and user.

Updated script
Unlike Tedd's original script below, this relies on OpenSimulator's own PID functionality to work, so you must uncomment the PIDFile entries in the [Startup] section of OpenSim.ini/Robust.ini and set them to /tmp/OpenSim.exe.pid and /tmp/Robust.exe.pid as appropriate.

This allows us to simplify the script and get better error reporting. Cleanly shutting down OpenSimulator has also been implemented.

The delay between attempting clean shutdown and force shutting down has been doubled to 20 seconds. However, in some cases this still might not be enough. In the future, it would be better to poll for status.

This script is maintained at https://github.com/justincc/opensimulator-tools/blob/master/infrastructure/control/init.d/src/opensim Pull requests welcome!