mmnaseri / nordvpn-reconnect

Reconnector for NordVPN client on Linux
21 stars 4 forks source link

difference from crontab? #6

Closed yash-fn closed 2 years ago

yash-fn commented 2 years ago

How would this be different than using crontab to reinitiate connection every hour or so and then manually killing the process with root whenvever it goes haywire? Sorry for noob question, just wanted to know if I need this or not.

mmnaseri commented 2 years ago

if you are on a single-user computer where the client portion of the VPN client (i.e. the user that runs nordvpn connect) is run under the same user as the server portion (i.e. the systemctl service unit nordvpnd) then there is no difference. The subtlety is that in a regular desktop installation, we ideally want to run the service as root and the non-service portion as a user entity. This means that just restarting the connection using root will basically cripple the current user since the current user then has no ability to interact with the client. The login credentials will also be stored under root, so, the nordvpn login command will have diverging behaviors between the two instances. Let me know if that doesn't answer your question :)

yash-fn commented 2 years ago

ah gotcha. that makes sense. Thanks for the detailed response!