Jump to content
Not connected, Your IP: 18.188.0.20
Sign in to follow this  
mith_y2k

Hummingbird boot script

Recommended Posts

Has anyone written a script to automatically start Hummingbird at boot? Ideally for a Raspberry Pi.

Share this post


Link to post

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.




 

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
Sign in to follow this  

×
×
  • Create New...