On Mon, 2007-07-16 at 17:41 +0200, Johannes Skov Frandsen wrote:
> Hey
> 
> I don't no if this is question for the gentoo mailing list but I'll try
> here first.
> 
> I'm trying to write a initscript for gentoo so cruisecontrol can start
> automatically on boot.

sounds like a good question for this list :)

[snip]

> running '/etc/init.d/cruise start'  yields this response:
> 
>  * Starting Cruise Control ...
> /sbin/start-stop-daemon: stat /bin/java
> -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
> -Dcc.library.dir=/opt/cruisecontrol/lib -jar
> /opt/cruisecontrol/lib/cruisecontrol-launcher.jar
> -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080:
> No such file or directory (No such file or directory)
> 
> obviously a file could not be found, but which and why?

the output is coming from start-stop-daemon, because that is the first
line printed (/sbin/start-stop-daemon: ...) so I think start-stop-daemon
can't find something.

usually you have to put a "--" between the executable and it's options,
or start-stop-daemon can get confused:

/sbin/start-stop-daemon --start --exec /path/to/bin -- --options

> When I run the same command from the shell:
> 
> java
> -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
> -Dcc.library.dir=/opt/cruisecontrol/lib -jar
> /opt/cruisecontrol/lib/cruisecontrol-launcher.jar
> -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080
> 
> I get his output:
> 
> 
> > > WARNING: cc.home reset to /opt/cruisecontrol

that looks more like java output, but you didn't run the command the
same way.  Try running start-stop-daemon from the shell.

> This is my first attempt on writing a initscript so bare with me if I
> have missed something obvious.

you may want to look at the --make-pidfile and --pidfile options to
start-stop-daemon when you've got it working.  This helps you stop the
daemon later.

HTH,
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

BOFH Excuse #206:

Police are examining all internet packets in the search for a 
narco-net-trafficker

-- 
[EMAIL PROTECTED] mailing list

Reply via email to