title: Java launch bash script issue
body: <p>I've seen many examples how to run bash script, I tried several and for some reason, my script fails in some functionality.</p>
  
  <p>I have a script <code>start_update_set_up</code> that is runned by <code>launcher</code>:</p>
  
  <pre><code>#!/bin/bash
  
  DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &amp;&amp; pwd )"
  echo "Script directory:"$DIR
  nohup bash -c $DIR/start_update_set_up &gt; $DIR/logs/start_update_set_up.log &amp;
  echo "Laucher finish execution"
  </code></pre>
  
  <p>If I run <code>launcher</code> directly from bash - if works perfectly. But if I try to run it from Java, sleep and curl function fails. Moreover, Java waiting for some reason while my main script finish execution, that I do not want and that's why I implement launcher and that's why do I want to detach it from Java by <code>nohup</code></p>
  
  <p>I tried: apache executor:</p>
  
  <p><code>executor.execute(commandLine, new DefaultExecuteResultHandler());</code> 
  Where commandline is my launcher.</p>
  
  <p>and runtime.</p>
  
  <pre><code>Runtime runtime = Runtime.getRuntime(); 
  try { Process process = runtime.exec("./launcher"); } catch (IOException e) {
     logger.error("ExecuteException at running update script");
     e.printStackTrace(); 
  }
  </code></pre>
  
  <p>What am I missing? How to detach bash from Java?</p>