VPN name issue

Scripts works well except that there is a little issue in the code. As it is the script will be able to list VPNs correctly but when checking a given VPN connection name, it will report VPN down even when the VPN is up. The issue here is that in the script the is a space ” ” added to the name value you pass on command line. To solve this modifiy the script as follows:

– search for: elsif ($name eq $vpn)
– replace with: elsif ($name eq $vpn.” “)

It should just a single replacement somewhere at the end of the script.