I wrote a Python script for PIA here: pia-auto-login.py
However, I need to make it more modular so that it does the OpenVPN changes from this script. Then I want to create two more packages (at least): one for Network Manager (removing the NM stuff from this script) and another one for Connman.
Each connection system seems to use a different format for the config file, but some people might want to use NM but not Connman (or maybe something else). I am not sure how I should set this up to work better.