title: nohup does not work properly
body: <p>I have a very simple bash script. I want this bash script to continue running after I log out from the terminal since it is monitoring some services. However, I have the problem that as soon as I exit the terminal the process is terminated.</p>
  
  <p>I run the process as: </p>
  
  <pre><code>nohup ./test.sh &gt; test.log &amp; 
  </code></pre>
  
  <p>I check the process using:</p>
  
  <pre><code> ps -aux | grep test.sh
  </code></pre>
  
  <p>When I run the process I check that the script is running. However, when I reconnect the script is not running anymore.</p>
  
  <p>The content of the test.sh file is the following:</p>
  
  <pre><code>#!/bin/bash
  while :
  do
          echo `date`": ****** Scheduled Test *****"
          result1=$(wget "127.0.0.1" -q -O -)
          result2=$(wget "127.0.0.1" -q -O -)
          echo ": $result1"
          echo ": $result2"
          if [[ $result1 == *"Running OK"* ]] &amp;&amp; [[ $result2 == *"Running OK"* ]];
          then
                  echo "***** Running OK ***** :)"
                  sleep 60
                  continue
          fi
          echo "@@@@@ Not Running @@@@@"
          echo "-----&gt; Killing JARS"
          kill -9 `lsof -i:4445 | cut -d' ' -f5`
          kill -9 `lsof -i:4423 | cut -d' ' -f5`
          ./runsomejar.sh &gt; jar1.log &amp; 
          echo "-----&gt; Restarting jar1"
          sleep 60
          echo "-----&gt; Restarting jar2"
          ./runsomejar.sh &gt; jar2.log &amp;
          sleep 180
  done
  </code></pre>