# HME app as linux daemon



## perrce (Feb 8, 2007)

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 (Jul 11, 2002)

Have you looked at http://commons.apache.org/daemon/?


----------



## perrce (Feb 8, 2007)

scerruti said:


> 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 (Jan 28, 2005)

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 (Feb 8, 2007)

s2kdave said:


> 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.


----------

