Deploying Membrane Router as a Windows Service
Using the free Java Service Wrapper from Tanuki Software, setting up Membrane Router as a service requires the following steps:
1. Download Tanuki's Java Service Wrapper
2. Set up the MEMBRANE_HOME System Variable
First of all a new environment variable must be set for the system, to know where the Membrane Router is installed.
Therefore open the System application in the Control Panel, go to Advanced and click on Environment Variables. Add a new system variable. Call it MEMBRANE_HOME and set its value to point the directory where Membrane Router is installed, e.g. C:\java\membrane-router-2.0.0.
3. Copy some Files
In this step some files have to be copied to the Membrane directory. To make things easier, Membrane comes with an Ant script that does the copying for us. If you are not familiar with Apache Ant you can also copy the required files manually (see below).
To run the Ant script open the command line and navigate to your MEMBRANE_HOME directory.
Type ant -file build-install-wrapper.xml and press enter. Please address your Service Wrapper directory after you'de be prompted to. Done!
4. (Un)-Registering the service
Now you are done with the configurations. Go to %MEMBRANE_HOME%\bin and run InstallMembrane-NT.bat to register the Membrane Router as a service.
Using other batch files you can unregister the service or start the service manually.
Congratulations: Membrane Router is now set up as a Service and will be started along with Windows. Use msconfig to adjust this behaviour.
To manually start/stop the memrouter service, open a command line and type:
net start memrouter net stop memrouter
If Membrane Router do not start up or the service doesn't register, check your environment variables. MEMBRANE_HOME must point to the directory where you installed Membrane Router. MEMBRANE_HOME must also be a system variable, user environment is not read when a program is started as service.
To make the wrapper more verbose, set wrapper.debug to true in conf/wrapper.conf.
(Alternative) 2. Copy the Files manually
If you want to avoid running the Ant script just copy and rename the files as follows: