A qBittorrent script that takes advantage of the docker healthcheck ability to do a few things every x seconds:
- Check if qBitorrent is up
- If yes, check if the configured listening port is the same as the forwarded port of the VPN provider.
- If they don't match, update the listening port.
If at any stage the results are unexpected, it will exit with code 1, meaning the container is classified as unhealthy in Docker.