[CentOS] Startup script woes

Jeff jlar310 at gmail.com
Wed Dec 2 13:47:48 UTC 2009


On Wed, Dec 2, 2009 at 3:55 AM, Robert Bielik <robert.bielik at xponaut.se> wrote:
> Ok, I think I'm going nuts. I simply want to startup a Java Service like so:
>
> daemon --pidfile=$PIDFILE --user $USER "cd $WORKING_DIR && /usr/bin/java $DAEMON_ARGS >/dev/null 2>&1 &"
>
> I can get it to startup alrite, but the litte "thingy" is that I have no way of getting the process ID of the
> started service to put in the PIDFILE, in order for me to later on be able to stop the service.
> (I can have up to 5 of these Java services running, each needing a different pidfile).
>
> This is a BREEZE to do in Debian/Ubuntu with start-stop-daemon!

I use the Java Service Wrapper to run JBoss in CentOS 4. A little work
to set up, but it works great once you get it figured out. My version
is s few years old now, so I can't speak for what may have changed in
the meantime.

http://wrapper.tanukisoftware.org/doc/english/download.jsp

--
Jeff


More information about the CentOS mailing list