This is the script,
/home/jack/myscript.sh, which I want to run:
export JAVA_HOME=/usr/lib/jvm/java-6-sun-22.214.171.124/ /home/jack/myapp/apache-tomcat-6.0.32/bin/./catalina.sh run
The upstart file,
/etc/init/myapp.conf, that I have written:
description "Myapp Server" start on runlevel  stop on runlevel  respawn respawn limit 10 5 exec `su jack -c /home/jack/myscript.sh`
So, if I want to run the script as user
jack, would my above configuration work? Is there a better way of doing it?