I have a hell of a time when a Java program runs correctly in an init script using start-stop-daemon. I wrote an init script and it seems to run, but will never represent the running program after that.
Here is a snippet of my init script
#! /bin/sh # # DAEMON="/usr/bin/java" DAEMON_ARGS="-server -cp <bunch of RMI arguments and classpath stuff> -jar <absolute path>/myprog.jar" PIDFILE="/var/run/myprog.pid" case "$1" in start) echo -n "Starting myprog" start-stop-daemon --start --pidfile "$PIDFILE" --chuid "myuser" --verbose --background --make-pidfile --startas "$DAEMON" -- $DAEMON_ARGS echo "." ;;
When I try to run it through /etc/init.d, I get the following:
/etc/init.d#/etc/init.d/myscript start
Running myprogStarting / usr / bin / java ...
Disabling to run / usr / bin / java ... done.
.
After that, the java interpretation process running myprog.jar is not started
I tried various combinations --exec, --start with more or less the same results. If I could get more visibility into what's going on, I'm sure I can understand it, but I'm not sure how to do it.
Any suggestions?
(I am running Angstrom on the embedded ARM platform, so the Java Service Wrapper is actually not a viable option, i.e. I don't think it is available for ARM)
I'm stuck, so any advice would be really appreciated.
Thanks.
java arm start-stop-daemon angstrom-linux
Colonelpackage
source share