Jump to content
Not connected, Your IP: 18.224.30.113
dellawee

Running Eddie CLI as service in debian based OSes

Recommended Posts

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

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...