Closed tannenzaepfle closed 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.
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.
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.