title: Running a few commands from bash script
body: <p>I thought that this should be straightforward, but the result is puzzling me.</p>
  
  <p>When I run a bash script using the command,</p>
  
  <pre><code>sudo ./restartccpd.bash
  </code></pre>
  
  <p>nothing appears on the screen. Also issue of </p>
  
  <pre><code>sudo /etc/init.d/ccpd status
  </code></pre>
  
  <p>independently from screen after running the script produces empty, rather than showing the pid's of the daemon. This evidences that only the pkill command is working.</p>
  
  <p>The contents of the script is,</p>
  
  <pre><code>#!/bin/bash
  
  sudo pkill -9 ccpd
  sudo /etc/init.d/ccpd start
  sudo /etc/init.d/ccpd status
  </code></pre>
  
  <p>The commands work fine when run from a terminal. But when run as a script, as pointed out above, it is not working as expected.</p>
  
  <p>I tried inserting sleep command between commands, without any avail. Also, nothing appears in syslog. So, I can not diagnose the problem.</p>
  
  <p>Any suggestion will be appreciated. </p>