Skip to content

Autostart on Linux

Snawoot edited this page May 3, 2021 · 3 revisions

systemd

System-wide

Assuming you have placed hola-proxy at path /usr/local/bin/hola-proxy.

Create file with following content in /etc/systemd/system/hola-proxy.service:

[Unit]
Description=Hola VPN
Documentation=https://github.com/Snawoot/hola-proxy/
After=network.target network-online.target
Requires=network-online.target

[Service]
EnvironmentFile=/etc/default/hola-proxy
User=nobody
Group=nogroup
ExecStart=/usr/local/bin/hola-proxy $OPTIONS
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full

[Install]
WantedBy=default.target

Create file /etc/default/hola-proxy with content like this:

OPTIONS=-country de

Reload systemd, enable unit autostart and start daemon:

systemctl daemon-reload
systemctl enable hola-proxy
systemctl restart hola-proxy

Check log output with following command:

journalctl -u hola-proxy -n 30

User service

Assuming you have placed hola-proxy at path /home/user/bin/hola-proxy.

Create file with following content in /home/user/.config/systemd/user/hola-proxy.service:

[Unit]
Description=Hola VPN
Documentation=https://github.com/Snawoot/hola-proxy/

[Service]
EnvironmentFile=/home/user/.config/hola-proxy
ExecStart=/home/user/bin/hola-proxy $OPTIONS
TimeoutStopSec=5s

[Install]
WantedBy=default.target

Create file /home/user/.config/hola-proxy with content like this:

OPTIONS=-country de

Reload systemd, enable unit autostart and start daemon:

systemctl --user daemon-reload
systemctl --user enable  hola-proxy
systemctl --user restart hola-proxy

Check log output with following command:

journalctl --user -u hola-proxy -n 30
Clone this wiki locally