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.

  • catloaf@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    I would investigate what is actually causing the connection to slow, but you can just run docker restart gluetun qbittorrent from cron or whatever.

    • Ferrous@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      4 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@lemmy.world
        link
        fedilink
        arrow-up
        2
        arrow-down
        2
        ·
        4 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.

  • iii@mander.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 days ago

    Make sure everything starts automatically after a reboot, and reboot daily.