title: how to run a bash script with multiple lines on crontab
body: <p>Because vpnc stopped every ~23 hours, I created a .sh file that is running as a cron job every 10 minutes, all that it does, is stop the vpnc process and run it again.</p>
  
  <p>I have made it executable by <code>chmod + x ping_vpnc.sh</code> and it works fine when I run it from the terminal via <code>./ping_vpnc.sh</code></p>
  
  <p>My file looks similar to:</p>
  
  <pre><code>#!/bin/sh
  
  killall vpnc #just to make sure I don't create too many tunnels.
  vpnc default.conf  #run vpnc connect file.
  </code></pre>
  
  <p>my crontab file:</p>
  
  <pre><code>*/10 * * * * /home/username/ping_vpnc.sh
  </code></pre>
  
  <p>the problem with the script that it does't run fully, so it just kill the process without re-running it.</p>
  
  <p>I'm running the script as root so I don't think that it's a privilege issue.</p>
  
  <p>Any idea about why this is happening? I will appreciate it.</p>