On my truenas scale machine, I have a container for gluetun and one for qbittorrent (among others). Maybe a couple times a week, I notice that the VPN connection gets flakey. Qbittorrent speeds go down into the kb/s range. This promps me to carry out an annoying, manual process:

  1. I pause all torrents in qbittorrent webui
  2. I stop both the qbit and gluetun containers
  3. I start the gluetun container
  4. I give the gluetun container adequate time to connect (since the qbit container depends on the gluetun network, attempting to start both at the same time yields an error on the qbit side)
  5. I start the qbit container
  6. I resume all torrents in the qbittorrent webui

Is there any easy way to automate this process? Preferably one that doesn’t require me to learn ansible? I’m hoping the solution could all be done via portainer - which I use.

Thank you in advance.

    • @[email protected]OP
      link
      fedilink
      English
      14 days ago

      You’re thinking i could make a bash script that pauses all torrents and a cronjob that restarts containers with some timing built in?

      • @just_another_person
        link
        04 days ago

        Yeah. Example: if pings get flakey, or can’t curl address, then restart all the things.

        Doesn’t need to stop torrents, just close the app, restart networking, and start it again.