First off I’ve got to say the ar750 is a phenomenal product with a wonderful community and awesome support. But… @alzhao or any other gli support:
I’ve been playing around with this and loving it, but i noticed a problem with the initswitch script. If i have it set to vpn it causes the vpn to start with two separate pids. So i looked into the file and i noticed it has built in logic, it just needs to be applied in another place as well. How could i modify the initswitch script to check the $LOCK file before starting the vpn, and skipping starting it if it’s the first run?. I know how to do it in theory, but in practice I’m a little rusty on the command line… Thanks
Would a simple ifdown vpn command added into the startvpn script fix my issue? Or would killall vpn command added work better instead? Or would we need to do kill -9 $(cat /var/run/ovpn_client.pid) >/dev/null 2>&1. Or just startvpn stop at the beginning of the startvpn script? Or am i just trying to over simplify things?
I guess i settled on a solution to try. Going to change these lines in initswitch file:
And I’ll let everyone know how things work out in a bit.
So changing this portion of the initswitch script does fix the problem of the vpn starting under two different instances and everything now works properly, includung the up/downdns scripts. Please look into adding this into the next update. Even tho other people may not realize they’re being affected this could fix some issues for other people as well.
Thanks to everyone who has contributed to this forum, I’ve learned a lot.