[vpn-help] Running ikec but can't make a batch

José Andrés Matamoros Guevara joseamatamoros at gmail.com
Wed Sep 18 10:13:16 CDT 2013


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


 

Andres.

 

From: Axel Eystein Jensen [mailto:axel.e.jensen at gmail.com] On Behalf Of Axel
E. Jensen
Sent: Monday, 16 September, 2013 3:06 PM
To: José Andrés Matamoros Guevara
Cc: vpn-help at lists.shrew.net
Subject: Re: [vpn-help] Running ikec but can't make a batch

 

Hi Andres

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?

If I make a minimal bash script, it works ok :

#!/bin/bash

ikec -r "myvpnsite" -u UserName -p PassWord -a


I hope it'll help you

/Axel

On 09/16/2013 07:38 PM, José Andrés Matamoros Guevara wrote:

Sorry for the latency, I have been making many tries and have same result.
I’m pasting the last result with the full path.

 

[root at Elastix3New ~]# service aicsrv start

ikec is not working

Malloc done!

ii : ## : VPN Connect, ver 2.2.1

## : Copyright 2013 Shrew Soft Inc.

## : press the <h> key for help

!! : failed to load '/usr/bin/ike/source/ikec/VPNfile.vpn'

 

I have called the batch “aicsrv”. If you have any other idea
 J

 

Andres.

 

From: vpn-help-bounces at lists.shrew.net
[mailto:vpn-help-bounces at lists.shrew.net] On Behalf Of Axel E. Jensen
Sent: Tuesday, 10 September, 2013 11:56 PM
To: vpn-help at lists.shrew.net
Subject: Re: [vpn-help] Running ikec but can't make a batch

 

Hi Andres

Could it be, that you need to specify the full path of the 'VPNfile.vpn' in
the bash script?

/Axel

On 09/10/2013 01:15 AM, José Andrés Matamoros Guevara wrote:

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.

 

So, I have written a little batch:

 

#!/bin/bash

#

# ikec

#

# Run as cron job to keep ikec VPN alive

#

if [ $(pgrep ikec) -gt 0 ]

then

   echo "ikec is working"

else

   echo "ikec is not working"

   export MALLOC_CHECK_=0

   echo "Malloc done!"

   ./usr/bin/ike/source/ikec/ikec -r VPNfile.vpn -u RemoteUser -p UserCode
-a

fi

 

exit

 

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.

 

Glad to be here!

 

Andres.







_______________________________________________
vpn-help mailing list
vpn-help at lists.shrew.net
https://lists.shrew.net/mailman/listinfo/vpn-help

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.shrew.net/pipermail/vpn-help/attachments/20130918/7845e508/attachment.html>


More information about the vpn-help mailing list