d4rkcat / pia

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

Change order of update process? #17

Closed tannenzaepfle closed 4 years ago

tannenzaepfle commented 5 years ago

I connected with the kill switch option activated and then was having some connectivity issues (probably PIA's fault) so I exited, which activated the kill switch. I ran "sudo pia -u" to update the server config files. I was offline so the files didn't download, but the script still removed the existing config files, even though I was offline and couldn't replace them, and I couldn't deactivate the kill switch without first connecting to a now no-longer-extant server. (Rebooting reset the kill switch though.)

I'm not sure how to implement it but it would be nice if fupdate() executed the "curl" line and would exit the routine if the computer is offline. Only after the replacement config files have been successfully downloaded should the script delete the old files.

nanodva commented 4 years ago

I have made a request for a patch, so that old files are replaced only if the downloading has succeed. Thanks for the precise bug report.

tannenzaepfle commented 4 years ago

No problem! I'm a product manager so bug reports come easily to me 😁 .

It looks like @d4rkcat hasn't been merging pull requests so at some point it may be necessary to fork the script.