d4rkcat / pia

Private Internet Access VPN Linux bash client
GNU General Public License v2.0
92 stars 18 forks source link

Misc. improvements. #5

Closed wijjo closed 6 years ago

wijjo commented 6 years ago

Automatically run as root.

Display GeoIP information.

Save connection data as JSON file.

Run in the background.

Other minor tweaks.

Please note that I am writing a Python version of the script, so I won't be spending much additional time on this bash script. Thanks for creating it! I hope some of my changes are useful.

d4rkcat commented 6 years ago

Hi there, Thanks for your interest in my script. The script already checks if user is root, and informs the user to run as root if not. Your geoip function uses python and adds hardly any functionality to the script. I wrote this script in bash and all contributions must be bash, I do not want hacky code which is a mish mash of languages. I wrote it in a way that it can be used on very minimal linux installations, and python is a big dependancy to ask people to install just for some geoip data. The JSON config file is a cool idea, and something I had considered previously. I would be more interested in a pull request with just this code, but written in only bash. Your run in background does not work, and it does not follow the programming flow of how this script is designed, you may as well just run the script like "pia&", how would you send the shutdown signal? Also your fork is way behind the current commit. So for now I can't commit this, but thank you very much for this, it is interesting to see what other programmers think can be improved.