![]() 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 ![]() # with the following user and group you need the sudoers.d file # 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |