diff --git a/conf/systemd/user/ipfs.service b/conf/systemd/user/ipfs.service index eaa278cc..0eaa683b 100644 --- a/conf/systemd/user/ipfs.service +++ b/conf/systemd/user/ipfs.service @@ -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 diff --git a/conf/systemd/user/protonvpn-user.service b/conf/systemd/user/protonvpn-user.service new file mode 100644 index 00000000..a476bbc8 --- /dev/null +++ b/conf/systemd/user/protonvpn-user.service @@ -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 diff --git a/conf/systemd/user/qbittorrent-nox.service b/conf/systemd/user/qbittorrent-nox.service index 641c077a..11cefb58 100644 --- a/conf/systemd/user/qbittorrent-nox.service +++ b/conf/systemd/user/qbittorrent-nox.service @@ -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