systemd/user: add properish protonvpn-user.service (& fix ipfs&qbt)

This commit is contained in:
Aminda Suomalainen 2021-02-27 08:58:56 +02:00
parent 5903664cb7
commit 3bde08d520
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723
3 changed files with 18 additions and 3 deletions

View File

@ -1,6 +1,7 @@
[Unit]
Description=IPFS daemon
After=network.target
After=network.target protonvpn-user.service
Wants=protonvpn-user.service
# IMPORTANT! If you are running on a VPS/dedicated/similar
# `ipfs init --profile=server` or immediately after setting it up
@ -12,7 +13,6 @@ After=network.target
# providers triggers netscan detection, risking account termination"
[Service]
ExecStartPre=/usr/bin/sudo -n /usr/bin/protonvpn connect --p2p
ExecStart=/home/mikaela/go/bin/ipfs daemon --routing=dht --enable-gc --enable-namesys-pubsub
# My attempts at explaining flags above + --mount for fuse

View File

@ -0,0 +1,14 @@
[Unit]
Description=ProtonVPN connection
After=network-online.target dbus.socket
Wants=network-online.target dbus.socket
[Service]
Type=forking
# ProtonVPN CLI v3.3.1 (protonvpn-nm-lib v0.4.2; proton-client v0.3.0)
ExecStartPre=sleep 60
ExecStart=protonvpn-cli connect --p2p
# ExecStop runs after forking leading into immediate disconnect!
[Install]
WantedBy=default.target

View File

@ -1,9 +1,10 @@
[Unit]
Description=A Headless Bittorrent client using rb_libtorrent
After=protonvpn-user.service
Wants=protonvpn-user.service
[Service]
Type=simple
ExecStartPre=/usr/bin/sudo -n /usr/bin/protonvpn connect --p2p
ExecStart=/usr/bin/qbittorrent-nox --webui-port=8081
ExecReload=/bin/kill -HUP $MAINPID