<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ES-SV link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi, guys! After a lot of reading and working, I have my vpn client running on a CentOS with no problems. Now, I’m trying to make it automatic because tunnel is falling down anytime and the installation is remote.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>So, I have written a little batch:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>#!/bin/bash<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US># ikec<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US># Run as cron job to keep ikec VPN alive<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>if [ $(pgrep ikec) -gt 0 ]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>then<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>   echo "ikec is working"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>else<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>   echo "ikec is not working"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>   export MALLOC_CHECK_=0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>   echo "Malloc done!"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>   ./usr/bin/ike/source/ikec/ikec -r VPNfile.vpn -u RemoteUser -p UserCode -a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>fi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>exit<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>If I run the command “./ikec –r VPNfile.vpn –u RemoteUser –p UserCode –a” from the ikec directory, everything run OK. If I run this batch, the VPNfile.vpn is not found… Any idea? I’m newbie in the batch world, hope anyone can give me some advices.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Glad to be here!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Andres.<o:p></o:p></span></p></div></body></html>