mith_y2k 6 Posted ... Has anyone written a script to automatically start Hummingbird at boot? Ideally for a Raspberry Pi. Quote Share this post Link to post
eburom 16 Posted ... Hi, if you use systemd you can set up a unit to do the job: I will assume you have a ovpn file with which you already run hummingbird: /path_to_your_file/hummingbird_boot.ovpn And hummingbird executable at a known place. If installed it can be checked running: $ which hummingbird /usr/bin/hummingbird I will assume this location. The systemd unit is nothing but a text file with some directives. You can create it as root with your preferred editor, place it in /etc/systemd/system and name it as you wish.in this case: /etc/systemd/system/airvpn.service (based on a suggestion in https://aur.archlinux.org/packages/hummingbird-bin/ ) [Unit] Description = AirVPN Client (hummingbird) Wants = network-online.target After = network-online.target [Service] ExecStart = /usr/bin/hummingbird /path_to_your_file/hummingbird_boot.ovpn Restart = always [Install] WantedBy = multi-user.target Note: make sure it is owned by root, in case you edited as your user and then sudo copied it. At this point you are all set, now you can use it as any other service: Make it run in that moment: $ sudo systemctl start airvpn Set it to start at every boot: $ sudo systemctl enable airvpn Restart while running: $ sudo systemctl restart airvpn Stop it: $ sudo systemctl stop airvpn Unset it to boot every time: $ sudo systemctl disable airvpn Check it's status: $ sudo systemctl status airvpn Access its logs: $ journalctl -u airvpn I think those are the more used ones. Haven't tried it in a raspberry but it works in some other systems. 1 2 pjnsmb, mith_y2k and Flusher reacted to this Quote Share this post Link to post
pjnsmb 13 Posted ... @eburom thanks for that it's working for me on debian sid. Quote Hide pjnsmb's signature Hide all signatures regardspjnsmb Share this post Link to post
mith_y2k 6 Posted ... Thanks @eburom this is very well explained. I’ll give it a shot tonight. Quote Share this post Link to post