Save the previously code in a file under: /etc/systemd/system/ and make it executable: sudo chmod +x /etc/systemd/system/protonvpn. Source: This blog post for the systemd script # connection to a network has been established # this make the trick, script will be executed only once the # if you want to run it as root user change user and group with root 7.99/mo (8.62/mo) For this review in Netherlands, we get the VPN Plus plan, which is now a bit more affordable at 8.62 per month (64.64 annually, 129.28 every two years). Includes ProtonVPN, Drive, Calendar, and Mail with a 30- day money back guarantee in Netherlands. # with the following user and group you need the sudoers.d file 1 day ago &0183 &32 Proton Unlimited in Netherlands. # as root the sudo command can be removed.ĮxecStart=/usr/bin/sudo /bin/protonvpn c -f > /home/myUserName/Desktop/out.txt Personally, if is not a problem the VPN start at system boot, I'm suggesting you to manage it with systemd.īelow and example how to manage a script with systemd once a network is connected: Sudo /bin/protonvpn c -f > /home/myUserName/Desktop/out.txt Protonvpn c -f > /home/myUserName/Desktop/out.txt Then modify /etc/profile.d/connectVPN.sh from: #!/bin/bash NOTE: modify the executable path and/or username if is not correct You can try to use sudo passwordless for the proton command for the user you want to run the VPN īy editing the /etc/sudoers.d/ folder add a file (any name is fine, like proton) with the following entry (assuming username is: measure and path of protonvpn is /bin/protonvpn): measure NOPASSWD: /bin/protonvpn
0 Comments
Leave a Reply. |