I think I saw that error some time ago, when I was using 1 year or more old certificates for AirVPN. Did you upgrade your DSM to latest 6+ version? Did you get new certificates and ovpn file from airvpn? Be sure to imput them at correct place. Is your AirVPN membership active? If you are using DSM <6 (5.2, 5.1, 5.0, 4...) then you need to ssh and copy certificates and keys manually. Just delete VPN from Synology interface, try restart, and do everything from beginning. I see what you mean. That never happened to me. Script always starts VPN if it's not started, but I managed to reproduce it by just using those variables in script, without anything else. Thank you for find, I just moved those variables further down to one of IFs, so they will be called only when VPN is up for sure. Hope that solves it for you also.