Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need HELP: Automate shutdown of dockers when Unifi gateway switches to failover 5G WAN

Featured Replies

So I have dockers that are data intensive and so I wanted to automate their shutdown whenever my primary internet goes down and the router switches over to failover which is on a limited 5G data plan (UniFi 5G Backup).

The ol' Elgoogs said to spin up a home assistant docker, and to use the unraid and unifi addons. Before I do something as complicated as that, I wanted to see if anyone else have a similar situation and they use something that's more built into unraid.

Thank you in advance!

PS: Also can anyone recommend an e-sim provider that's not $80/year for 10GB of backup internet? Lol.

How technical are you? Last time I looked (I decided it wasn't worth the effort) UniFi uses dpinger to check the interface and start the failover.

You can create your own dpinger instance on the unifi hardware, which can run a script (on the unifi appliance) which in turn used ssh (and sshpass - be careful bad mmkay) to launch a script on the unraid box to "docker stop" containers.

This should help. Its a pain tbh,

Just now, Flubster said:

How technical are you? Last time I looked (I decided it wasn't worth the effort) UniFi uses dpinger to check the interface and start the failover.

You can create your own dpinger instance on the unifi hardware, which can run a script (on the unifi appliance) which in turn used ssh (and sshpass - be careful bad mmkay) to launch a script on the unraid box to "docker stop" containers.

This should help. Its a pain tbh,

Other option as a thought - if you use something like cloudflare (or another ddns provider), you could set the unifi to update the ddns entry for a hostname - as long as WAN1 is static you can nslookup the hostname and if its your static IP you'll know you are on WAN1, should this change then you'll know you are on WAN2 or failover

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.