[strongSwan] Knowing when StrongSwan is up and ready

Ken Nelson ken at cazena.com
Fri Oct 2 17:41:18 CEST 2015


Forgot to mention:  Strongswan 5.3.0 on Centos 6.6.  Will also want this with StrongSwan 5.3.3 on Centos 7.


> On Oct 2, 2015, at 9:39 AM, Ken Nelson <ken at cazena.com> wrote:
> 
> I have a bash script that does the following to start strongswan and initiate / establish a connection:
> 
> sudo service strongswan start
> sleep 2
> sudo strongswan up myconn
> 
> where myconn is defined in /etc/strongswan/ipsec.conf
> 
> 
> Typically, the (arbitrary) two second delay is sufficient for SS to come up and be ready, however on some virtual machine environments it is not, producing the error:
> 
> no config named ‘myconn’
> 
> This is likely due to host load and/or filesystem delays.  
> 
> 
> There are a number ways around this problem (lengthen delay, retry ‘up’ command, etc.), but I’m wondering if there is a deterministic, recommended way to know (from a Bash script) when StrongSwan is up and ready?  I didn’t see anything immediately obvious when looking at “strongswan —help” or “swanctl —help”.
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.strongswan.org
> https://lists.strongswan.org/mailman/listinfo/users



More information about the Users mailing list