dellawee 13 Posted ... Hey! I'm working on a tutorial that involves using running Eddie CLI as a service. I have something that works but I would like to get some feed back before I use it in a tutorial. This is my /ect/init.d/airvpn file which would likely be the only thing likely to be changed. #!/bin/sh ### BEGIN INIT INFO # Provides: airvpn # Required-Start: # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start and stop airvpn # Description: airvpn ### END INIT INFO path_to_config_file="/home/pi/.airvpn/" # Do NOT change anything below this line unless you know what you are doing! exec 1>/var/log/airvpn.service.log 2>&1 case "$1" in start) echo "Connecting to Airvpn " /usr/bin/airvpn -cli -path="$path_to_config_file" & ;; stop) echo "Closing connection to airvpn " killall airvpn mono openvpn ;; *) echo "Usage: /etc/init.d/airvpn {start|stop}" exit 1 ;; esac exit 0 This is modified code from here https://www.htpcbeginner.com/guide-configure-openvpn-autostart-linux/ . Would love to hear you guys suggestions Quote Share this post Link to post
snoodlehouse 1 Posted ... I don't know a lot about Bash, but noticed:path_to_config_file="/home/pi/.airvpn/" Make sure to clearly document that this needs to be changed depending on the user's username. I'm assuming this script needs to be run with sudo and "~/.airvpn" wouldn't work. But again, I don't know a lot about Bash. I would be interested in using this script when you get the tutorial finished! I had spent a week trying to get openvpn working on the CLI without DNS leaks. I gave up. But you just informed me that the airvpn executable has a CLI option, which is way easier. Hopefully it won't constantly crash like Eddie. Your script will make things even smoother. Quote Share this post Link to post