start-stop-daemon can't find executable that's right in front of it

Posted by Bart van Heukelom on Server Fault See other posts from Server Fault or by Bart van Heukelom
Published on 2012-06-01T14:35:14Z Indexed on 2012/06/01 16:43 UTC
Read the original article Hit count: 520

Filed under:
|
|
root@mountain-lion:/opt/smartfox# ls -lha
total 180K
drwxr-xr-x 8 root root 4.0K 2012-06-01 14:09 .
drwxr-xr-x 4 root root 4.0K 2012-06-01 09:41 ..
drwxr-xr-x 8 root root 4.0K 2009-05-17 21:57 lib
lrwxrwxrwx 1 root root   22 2012-06-01 09:41 logs -> /var/opt/smartfox/logs
-rwxr-xr-x 1 root root 1.4K 2012-06-01 14:28 run.sh


root@mountain-lion:/opt/smartfox# cat run.sh 
#!/bin/bash    
java -cp "./:./sfsExtensions/:lib/activation.jar:lib/commons-beanutils.jar:lib/commons-collections-3.2.jar:lib/commons-dbcp-1.2.1.jar:lib/commons-lang-2.3.jar:lib/commons-logging-1.1.jar:lib/commons-pool-1.2.jar:lib/concurrent.jar:lib/ezmorph-1.0.3.jar:lib/h2.jar:lib/js.jar:lib/json-lib-2.1-jdk15.jar:lib/json.jar:lib/jsr173_1.0_api.jar:lib/jysfs.jar:lib/jython.jar:lib/nanoxml-2.2.1.jar:lib/wrapper.jar:lib/xbean.jar:lib/javamail/imap.jar:lib/javamail/mailapi.jar:lib/javamail/pop3.jar:lib/javamail/smtp.jar:lib/jetty/jetty.jar:lib/jetty/jetty-util.jar:lib/jetty/jstl.jar:lib/jetty/multipartrequest.jar:lib/jetty/servlet-api.jar:lib/jetty/standard.jar:lib/jsp-2.1/commons-el-1.0.jar:lib/jsp-2.1/core-3.1.0.jar:lib/jsp-2.1/jsp-2.1.jar:lib/jsp-2.1/jsp-api-2.1.jar:lib/jsp-2.1/jstl.jar:lib/jsp-2.1/standard.jar:lib/lsc.jar:lib/commons-io-1.4.jar" \
it.gotoandplay.smartfoxserver.SmartFoxServer > logs/smartfox.out 2>&1 &
JAVAPID=$!
echo "Started Smartfox. JVM PID = $JAVAPID"
trap "echo Stopping Smartfox.; kill $JAVAPID" INT TERM
wait
echo "Smartfox stopped."


root@mountain-lion:/opt/smartfox# start-stop-daemon --start --make-pidfile --pidfile /var/opt/smartfox/smartfox.pid --exec ./run.sh
start-stop-daemon: unable to start ./run.sh (No such file or directory)

Why can't start-stop-daemon find the script?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about daemon