Gentoo Archives: gentoo-user

From: Iain Buchanan <iaindb@××××××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Starting cruisecontrol -> initscript
Date: Mon, 16 Jul 2007 23:42:29
Message-Id: 1184628940.13623.28.camel@orpheus
In Reply to: [gentoo-user] Starting cruisecontrol -> initscript by Johannes Skov Frandsen
1 On Mon, 2007-07-16 at 17:41 +0200, Johannes Skov Frandsen wrote:
2 > Hey
3 >
4 > I don't no if this is question for the gentoo mailing list but I'll try
5 > here first.
6 >
7 > I'm trying to write a initscript for gentoo so cruisecontrol can start
8 > automatically on boot.
9
10 sounds like a good question for this list :)
11
12 [snip]
13
14 > running '/etc/init.d/cruise start' yields this response:
15 >
16 > * Starting Cruise Control ...
17 > /sbin/start-stop-daemon: stat /bin/java
18 > -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
19 > -Dcc.library.dir=/opt/cruisecontrol/lib -jar
20 > /opt/cruisecontrol/lib/cruisecontrol-launcher.jar
21 > -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080:
22 > No such file or directory (No such file or directory)
23 >
24 > obviously a file could not be found, but which and why?
25
26 the output is coming from start-stop-daemon, because that is the first
27 line printed (/sbin/start-stop-daemon: ...) so I think start-stop-daemon
28 can't find something.
29
30 usually you have to put a "--" between the executable and it's options,
31 or start-stop-daemon can get confused:
32
33 /sbin/start-stop-daemon --start --exec /path/to/bin -- --options
34
35 > When I run the same command from the shell:
36 >
37 > java
38 > -Djavax.management.builder.initial=mx4j.server.MX4JMBeanServerBuilder
39 > -Dcc.library.dir=/opt/cruisecontrol/lib -jar
40 > /opt/cruisecontrol/lib/cruisecontrol-launcher.jar
41 > -configfile=/opt/cruisecontrol/config.xml -jmxport 8000 -webport 8080
42 >
43 > I get his output:
44 >
45 >
46 > > > WARNING: cc.home reset to /opt/cruisecontrol
47
48 that looks more like java output, but you didn't run the command the
49 same way. Try running start-stop-daemon from the shell.
50
51 > This is my first attempt on writing a initscript so bare with me if I
52 > have missed something obvious.
53
54 you may want to look at the --make-pidfile and --pidfile options to
55 start-stop-daemon when you've got it working. This helps you stop the
56 daemon later.
57
58 HTH,
59 --
60 Iain Buchanan <iaindb at netspace dot net dot au>
61
62 BOFH Excuse #206:
63
64 Police are examining all internet packets in the search for a narco-net-trafficker
65
66 --
67 gentoo-user@g.o mailing list