goose-ws / bash-scripts

A collection of bash scripts I've hacked together over time
MIT License
10 stars 3 forks source link

[sonarr-update-tba] Unable to determine IP address after recent update #5

Closed schumi4 closed 9 months ago

schumi4 commented 9 months ago

Hi,

after a recent update the script fails:

./sonarr-update-tba.bash
sonarr-update-tba.bash   ::   2024-01-28 21:51:07   ::   [verb]  No new updates available
sonarr-update-tba.bash   ::   2024-01-28 21:51:07   ::   [info]  Processing container: sonarr
sonarr-update-tba.bash   ::   2024-01-28 21:51:07   ::   [info]  Attempting to automatically determine container IP address
sonarr-update-tba.bash   ::   2024-01-28 21:51:07   ::   [verb]  Container is utilizing 0 network type(s):
sonarr-update-tba.bash   ::   2024-01-28 21:51:07   ::   [verb]  Lockfile removed
sonarr-update-tba.bash   ::   2024-01-28 21:51:07   ::   [error] Unable to determine IP address

LSIO Sonarr container is routed via gluetun, both in same compose file. Script used to run without a hitch with the same setup on my side.

goose-ws commented 9 months ago

I used to run mine through gluetun too. I also don't think I touched the find IP address section. In any case, let me look at it, I'll get back to you in the next day or two. Apologies for breaking it.

goose-ws commented 9 months ago

I ended up having a free 20 minutes and just sat down to look at it. I just pushed a commit that should fix it. Let me know if it's still giving you issues.

schumi4 commented 9 months ago

Thanks for the quick responses!

./sonarr-update-tba.bash
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [verb]  No new updates available
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [info]  Processing container: sonarr
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [info]  Attempting to automatically determine container IP address
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [verb]  Container is utilizing 0 network type(s):
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [info]  No network type defined. Checking to see if networking is through another container.
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [verb]  Network mode: container
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [info]  Networking routed through another container. Retrieving IP address.
sonarr-update-tba.bash   ::   2024-01-28 23:40:59   ::   [verb]  Lockfile removed

and that's it :(

goose-ws commented 9 months ago

Gah. Okay. I wanted to rewrite that block of script to be more resilient as a standalone function anyways, so here's my motivation to do that. I can probably get it done during down time at work tonight, as long as they don't keep me too busy. More commits to come soon™️.

goose-ws commented 9 months ago

Alright, just pushed a commit that works for me in testing, let me know how it works for you.

schumi4 commented 9 months ago

Works beautifully, thank you!