What's new

AC68U with three VLANs

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

manually start the appropriate VPN during the boot
Could you share how you do this? I haven't been able to figure out how the vpn_client* variables become the dynamically generated configuration in /etc/openvpn/client*...
 
Could you share how you do this? I haven't been able to figure out how the vpn_client* variables become the dynamically generated configuration in /etc/openvpn/client*...
I use the following logic in nat-start
Code:
# Check if VPN client is UP, or if we are in BOOT mode and "Automatic start at boot time=NO"

[ -f /tmp/BOOTINPROGRESS ] && ACTION="on" || ACTION="restart"               # Semaphore created/deleted in init-start

VPN_LIST="1 2"

for VPNID in $VPN_LIST
    do
        NVRAM_STATE=$(nvram get vpn_client${VPNID}_state)                   # 0=Disconnected;1=Connecting,2=Connected
        logger -t "($(basename $0))" "Checking if VPN Client$VPNID is UP...."

        if [ "$NVRAM_STATE" == "2" ] || [ -f /tmp/BOOTINPROGRESS ];then

            service restart_vpnclient$VPNID                                 # Bounce or initialise the VPN Client
            #/jffs/scripts/VPN_Client_Switch.sh $VPNID $ACTION              # My custom script

            #sleep 60                                                       # Cosmetic...keeps Syslog tidy
        fi
    done
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top