title: Bash script to start logstash java script
body: <p>I'm using AWS EC2 and a custom script that needs to run:</p>
  
  <pre><code>java -jar logstash-1.3.3-flatjar.jar agent -f shipper.conf
  </code></pre>
  
  <p>But it only seems to work after I ssh into the server and run it manually.
  I found this link: "<a href="https://stackoverflow.com/questions/11809191/linux-launch-java-program-on-startup-ec2-instance">Linux Launch java program on startup (EC2 instance)</a>"</p>
  
  <p>But that did not help me. How can I get my bash script to run this command? I even tried creating a second shell script that only executes my logstash java script.</p>