# Supervisor - Restart device when network is down?

**URL:** <https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170>\
**Category:** balenaOS\
**Created:** [May 19, 2020, 4:17pm UTC](https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170 "2020-05-19T16:17:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tibhel](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tibhel/32/3604_2.png) [@tibhel](https://forums.balena.io/u/tibhel)\
**Post date:** [May 19, 2020, 4:17pm UTC](https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170/1 "2020-05-19T16:17:15Z")

</div>

Hi!  
Does the supervisor V10.6.27 restart the device if for example the network is down due to ethernet cable unplug?

I’m asking this because if the ethernet cable is unplugged during runtime, the device needs a restart for it to detect the unplug and try to use the cellular modem instead. Before implementing a custom service I thought that maybe the supervisor already did this.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![tmigone](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tmigone/32/2814_2.png) [@tmigone](https://forums.balena.io/u/tmigone)\
**Post date:** [May 19, 2020, 4:41pm UTC](https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170/2 "2020-05-19T16:41:10Z")

</div>

Hello there, as far as I’m aware the supervisor doesn’t behave in that way. I’ll ask the supervisor maintainers about it but I’m 99% certain this is not the case.

---

<div class="post-metadata">

**Author:** ![tibhel](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tibhel/32/3604_2.png) [@tibhel](https://forums.balena.io/u/tibhel)\
**Post date:** [May 20, 2020, 7:19am UTC](https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170/6 "2020-05-20T07:19:30Z")

</div>

Hi!  
Ok if that’s the case, what would you recommend me doing instead?

---

<div class="post-metadata">

**Author:** ![odyslam](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/odyslam/32/1684_2.png) [@odyslam](https://forums.balena.io/u/odyslam)\
**Post date:** [May 20, 2020, 9:17am UTC](https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170/8 "2020-05-20T09:17:01Z")

</div>

Hey, you could create a very simple container that has a bash script which checks for the ethernet connection and in case it can’t find any, it performs a `curl` to the supervisor to reboot the device. You can read more about interacting with the supervisor in our [documentation](https://www.balena.io/docs/reference/supervisor/supervisor-api/#post-v1reboot).

How does that sound do you?

---

<div class="post-metadata">

**Author:** ![tibhel](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tibhel/32/3604_2.png) [@tibhel](https://forums.balena.io/u/tibhel)\
**Post date:** [May 20, 2020, 2:20pm UTC](https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170/10 "2020-05-20T14:20:50Z")

</div>

Hi, okey, would I be able to set a timeout interval value so that it doesn’t reboot all the time during cellular activation (takes \<1min)?

Thanks!

---

<div class="post-metadata">

**Author:** ![richbayliss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/richbayliss/32/1054_2.png) [@richbayliss](https://forums.balena.io/u/richbayliss)\
**Post date:** [May 20, 2020, 2:50pm UTC](https://forums.balena.io/t/supervisor-restart-device-when-network-is-down/117170/11 "2020-05-20T14:50:28Z")

</div>

It would be you script doing the logic/descision, so I guess so 👍
