View Full Version : HME app as linux daemon
perrce
07-14-2008, 10:49 AM
Is there a trick to getting an HME app to run as a linux daemon?
On Windows XP, I'm using Java Service Wrapper to run my app as a service, but the same strategy doesn't work on linux. Neither has writing a custom init.d script, or starting from /etc/rc.local. Although I can start it from commandline just fine, when starting at boot time it exists after running init() in the Factory.
Any ideas?
scerruti
07-15-2008, 06:46 PM
Have you looked at http://commons.apache.org/daemon/?
perrce
07-15-2008, 07:24 PM
Have you looked at http://commons.apache.org/daemon/?
I hadn't seen that. I'll check it out after I finish beating my head against the wall that is Java Service Wrapper.
I saw that Galleon uses Java Service Wrapper as well, and I've been poking at their code, but they seem to do have a pretty unique setup that I'm not sure I can draw any conclusions from.
Anyone able to get Java Service Wrapper to work with their HME app?
s2kdave
07-19-2008, 01:25 AM
The Java Service Wrapper works perfectly fine on linux, you just need the right binaries and scripts. They come with the download. I use it on my movie rentals standalone app. You can download it and look at the files for reference.
perrce
07-21-2008, 04:16 PM
The Java Service Wrapper works perfectly fine on linux
Yeah, it does. I figured out my problem. I was testing on my linux laptop which uses Network Manager to assign the IP address to the wireless card. Notably, this happens after the user logs in, well after the daemons in /etc/init.d are started.
Basically, the HME app was starting up, finding no interfaces except 127.0.0.1, and then bailing out. Once I tracked down the problem it seemed obvious -- at the time, not so much. :-)
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.