title: Java jsch sudo shell script not working as expected, Linux, Unix
body: <p>I have a shell script containing start and status methods.</p>
  
  <p>When I run start method  <strong>manually</strong> from the shell the command will be like</p>
  
  <pre><code>sudo -u x /y.sh start
  </code></pre>
  
  <p>Output will be <code>Process has started</code>.
  After that if I run status method from shell the command will be like</p>
  
  <pre><code>sudo -u x /y.sh status
  </code></pre>
  
  <p>Output will be <code>Process is running</code></p>
  
  <p>If I run the shell script  using <strong>Jsch sudo class</strong> 
  When running start method
  I am getting output as <code>Process has started</code>
  After that I run the status method I am getting the output as
  <code>Process is not running</code> instead of <code>Process is running</code> as we started the process using start.</p>
  
  <p>How to make the status start from Jsch?
  Please suggest me....</p>
  
  <p>I am placing the shell script code here</p>