Autostart FactoryPMI in linux

Hey guys, long time no see,

I am trying to set up FactoryPMI on an ubuntu host, and all is going extremely well, however, I do have one issue.

I moved startGateway.sh to /etc/init.d, and modified it to statically point to my install dir (/usr/local/FactoryPMI). When i run the script manually, it runs fine. However after adding the scripts to the various run levels(update-rc.d startGateway.sh defaults), the machine no longer boots up all the way, freezing at the startGateway script. No, I assume I shouldnt’ be running this script at each run level, ad presume run level 5 would be when I want to start it, but need some hand holding. Any ideas?

maybe you just need to have the script run the Gateway process in the background. It is probably waiting for the script to finish, which means that it is waiting for FactoryPMI Gateway to stop, which of course it doesn’t want to do.

Try adding an ampersand (&) to the end of the java command, like

java -classpath [..snip] ...gateway.Service &

Nice, that worked. Do you know the command to stop the gateway, so I can also add that to the script?

hmm…there isn’t really one, unless you were to write a program/script that emulated the “Monitor Gateway” app and hook into that app’s localhost-only control interface…