From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GFT0c-0002W5-SQ for garchives@archives.gentoo.org; Tue, 22 Aug 2006 09:57:23 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k7M9uZhQ024051; Tue, 22 Aug 2006 09:56:35 GMT Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k7M9sjJC018798 for ; Tue, 22 Aug 2006 09:54:45 GMT Received: from [10.73.1.31] (uberlaptop.marples.name [10.73.1.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id 47298190038 for ; Tue, 22 Aug 2006 10:54:45 +0100 (BST) From: Roy Marples Organization: Gentoo/Linux To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] java and start-stop-daemon [repost] Date: Tue, 22 Aug 2006 10:54:35 +0100 User-Agent: KMail/1.9.4 References: <44EAB563.1040103@subsignal.org> In-Reply-To: <44EAB563.1040103@subsignal.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Message-Id: <200608221054.35634.uberlord@gentoo.org> X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id k7M9sjJC018798 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id k7M9uZjE024051 X-Archives-Salt: dacc2c29-9370-492b-83f9-ac341a4e4786 X-Archives-Hash: 2e87216ed8a1d04ec62b3669d1bf20e2 On Tuesday 22 August 2006 08:42, paul k=F6lle wrote: > works from command prompt: > gentoo ~ # start-stop-daemon -v --start --chuid helma --background > --pidfile /var/run/helma-default.pid --make-pidfile --startas > /opt/sun-jdk-1.5.0.08/bin/java -- -Djava.headless=3DTrue -Xmx64m -Xms64= m > -jar /opt/helma-1.5.1/launcher.jar -h /opt/helma-1.5.1/ -w 8080 > > -> app is running > > > gentoo ~ # /etc/init.d/helma start > * Starting checkconfig with instance default > * This is passed to java: -Djava.headless=3DTrue -Xms64m -Xmx64m -jar > /opt/helma-1.5.1/launcher.jar -h /opt/helma-1.5.1/ -w 8080 > * Starting helma instance default. ... > Starting /opt/sun-jdk-1.5.0.08/bin/java... > Detatching to start /opt/sun-jdk-1.5.0.08/bin/java...done. > [ ok ] > > -> app not running > > I'm mostly interested in changing the user at startup and pid file > handling. If start-stop-daemon won't work I'd need to add sudo to > RDEPEND and grab the PID from "ps U" or similar... I'd prefer doing it > in a more "standard" way though. What is /opt/sun-jdk-1.5.0.08/bin/java ? Does it change it's process name= at=20 all? Maybe you need to use the --name option. I ask as for init scripts we have a bash wrapper around s-s-d that is a l= ot=20 more strict than s-s-d itself. For example it should only be used for=20 daemons - ie what you call is expected to be a daemon. Thus it is useless= for=20 shell scripts that call daemons. See the courier-imap fiasco for details = on=20 this. For hints on what we do, checkout /lib/rcscripts/sh/rc-daemon.sh Thanks --=20 Roy Marples Gentoo/Linux Developer (baselayout, networking) --=20 gentoo-dev@gentoo.org mailing list