Hello
I am not guru in Linux
Maybe some could help me with script how can I reboot router if any interfaces was disconnected?
I think I have to chande the contents of /etc/hotplug.d/iface/16-mwancustom
Available variables:
$ACTION
<ifup Is called by netifd and mwan3track
<fdown Is called by netifd and mwan3track
<connected Is only called by mwan3track if tracking was successful
<disconnected Is only called by mwan3track if tracking has failed
$INTERFACE Name of the interface which went up or down (e.g. "wan" or "wwan")
$DEVICE Physical device name which interface went up or down (e.g. "eth0" or "wwan0")
I think script would be following:
!/bin/sh
if [ "$INTERFACE" = "wan1" || "$INTERFACE" = "wan2" ]; then
if [ "$ACTION = "ifdown" ]; then
sleep 70 && touch /etc/banner && reboot
fi
fi
exit 0
I’m using two LTE modems with mwan3
Sometimes connect is broken on any modem.
I get lost ping firstly and then offline status of the interfaces wan1 or wan2
I don’t know reasons of that because system and kernel Logs contains nothing about it
I reboot router linksys wrt3200 and the both modems are worked fine again