title: Problems running a bash script server side from Meteor
body: <p>I have a bash script that I am running server side from meteor. I have tested that I am successfully able to run shell commands by running 'ls' and getting the expected response back. However, when I run my shell script no output is ever logged to the server console and none of the intended effects of the script are successful. I am printing stderr,stdout, and error yet they print nothing when I run my script.</p>
  
  <pre><code> Meteor.methods({
          grade: function(unittest, code) {
              this.unblock();
  
              var sys = Npm.require('sys');
              var exec = Npm.require('child_process').exec;
  
              // exec('/bin/ls /srv/srcalyzer/scripts', function(error,stdout,stderr){
              //     console.log('error: ',error);
              //     console.log('stdout: ',stdout);
              //     console.log('stderr: ',stderr);
              // });
  
              console.log('running grade')
              exec('/bin/bash /srv/srcalyzer/scripts/grade.sh', function(error,stdout,stderr){
                  console.log('error: ',error);
                  console.log('stdout: ',stdout);
                  console.log('stderr: ',stderr);
              });
              console.log('just finished.');    
          },
  </code></pre>
  
  <p>Although it is currently commented out the /bin/ls /some/path logs the expected output to console. However when I run the /bin/bash /path/to/.sh that I know is in place. The console output looks like</p>
  
  <pre><code>I20161207-15:22:07.031(-5)? running grade
  I20161207-15:22:07.045(-5)? just finished.
  </code></pre>
  
  <p>The script does take a short time to run (~15-20 seconds). I am uncertain if this is relevant or not.</p>
  
  <p>Can someone please help me understand what is happening?</p>