<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<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 name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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";
        color:black;
        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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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 bgcolor=white lang=ES-SV link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks for your time, Axel. It’s odd: if I run the ikec as a command it works OK. If I run it from the batch, it doesn’t. I have changed the path and write it with “”, but still having the same problem. Don’t know what else I can do…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Andres.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:ES-SV'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:ES-SV'> Axel Eystein Jensen [mailto:axel.e.jensen@gmail.com] <b>On Behalf Of </b>Axel E. Jensen<br><b>Sent:</b> Monday, 16 September, 2013 3:06 PM<br><b>To:</b> José Andrés Matamoros Guevara<br><b>Cc:</b> vpn-help@lists.shrew.net<br><b>Subject:</b> Re: [vpn-help] Running ikec but can't make a batch<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi Andres<br><br>I believe, that I unfortunately misinformed you. Sorry about that. Looking in 'ikec' man page, the '-r' option is given the name of the Site Configuration. I'm not sure, if this is the same as the filename?<br><br>If I make a minimal bash script, it works ok :<br><br>#!/bin/bash                                                                                                                   <br>ikec -r "myvpnsite" -u UserName -p PassWord -a<br><br><br>I hope it'll help you<br><br>/Axel<br><br>On 09/16/2013 07:38 PM, José Andrés Matamoros Guevara wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Sorry for the latency, I have been making many tries and have same result. I’m pasting the last result with the full path.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>[root@Elastix3New ~]# service aicsrv start</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>ikec is not working</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Malloc done!</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>ii : ## : VPN Connect, ver 2.2.1</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>## : Copyright 2013 Shrew Soft Inc.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>## : press the <h> key for help</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>!! : failed to load '/usr/bin/ike/source/ikec/VPNfile.vpn'</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I have called the batch “aicsrv”. If you have any other idea… </span><span lang=EN-US style='font-family:Wingdings;color:#1F497D'>J</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Andres.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:ES-SV'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:ES-SV'> <a href="mailto:vpn-help-bounces@lists.shrew.net">vpn-help-bounces@lists.shrew.net</a> [<a href="mailto:vpn-help-bounces@lists.shrew.net">mailto:vpn-help-bounces@lists.shrew.net</a>] <b>On Behalf Of </b>Axel E. Jensen<br><b>Sent:</b> Tuesday, 10 September, 2013 11:56 PM<br><b>To:</b> <a href="mailto:vpn-help@lists.shrew.net">vpn-help@lists.shrew.net</a><br><b>Subject:</b> Re: [vpn-help] Running ikec but can't make a batch</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><div><p class=MsoNormal>Hi <span lang=EN-US>Andres<br><br>Could it be, that you need to specify the full path of the 'VPNfile.vpn'</span> in the bash script?<br><br>/Axel<br><br>On 09/10/2013 01:15 AM, José Andrés Matamoros Guevara wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><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.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>So, I have written a little batch:</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#!/bin/bash</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US># ikec</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US># Run as cron job to keep ikec VPN alive</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>#</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>if [ $(pgrep ikec) -gt 0 ]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>then</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>   echo "ikec is working"</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>else</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>   echo "ikec is not working"</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>   export MALLOC_CHECK_=0</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>   echo "Malloc done!"</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>   ./usr/bin/ike/source/ikec/ikec -r VPNfile.vpn -u RemoteUser -p UserCode -a</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>fi</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>exit</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></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.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Glad to be here!</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Andres.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><br><br><br><br></span><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>vpn-help mailing list<o:p></o:p></pre><pre><a href="mailto:vpn-help@lists.shrew.net">vpn-help@lists.shrew.net</a><o:p></o:p></pre><pre><a href="https://lists.shrew.net/mailman/listinfo/vpn-help">https://lists.shrew.net/mailman/listinfo/vpn-help</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt'> </span><o:p></o:p></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:ES-SV'><o:p> </o:p></span></p></div></body></html>