Mantis - Resin
Viewing Issue Advanced Details
2647 major always 05-02-08 15:20 05-22-08 22:17
wirah  
ferg  
normal  
closed 3.1.5  
fixed  
none    
none 3.2.0  
0002647: contrib/init.resin.in does fails due to unquoted commands
When I run the provided init script on Ubuntu Server 6.06 LTS, the server does not start and the script freezes because the interpreter reads the command:

su ant -c /usr/lib/jvm/java-6-sun/bin/java -jar /opt/resin/lib/resin.jar -resin-home /opt/resin start

as passing '-jar' to the su command. If I modify it as follows:

su ant -c "/usr/lib/jvm/java-6-sun/bin/java -jar /opt/resin/lib/resin.jar -resin-home /opt/resin start"

Then it works fine. The init script needs to be modified as I can imagine this happenning on a lot of systems.

Notes
(0003033)
wirah   
05-02-08 16:10   
Thought i'd post my script fix as I got it wrong above:

In the start) and stop) stanzas:

su ant -c "... "

should be:

su ant -c """... """

As one set of quotes is ignored, two sets break it, and three mean the command is sent to the shell, quoted.