Skip to content

Instantly share code, notes, and snippets.

@sthen
Last active August 17, 2021 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sthen/a656e18cdcd50f0751eb74201ff2bce7 to your computer and use it in GitHub Desktop.
Save sthen/a656e18cdcd50f0751eb74201ff2bce7 to your computer and use it in GitHub Desktop.
# routeros netwatch config to attempt to reset a crashed LTE modem
/tool netwatch add down-script="/system scheduler remove [find where name~\"RePowerUSBv\"];\
\n/system scheduler add name=RePowerUSBv1 interval=5m on-event={/system scheduler remove [find where name=RePowerUSBv1]; /system routerboard usb power-reset duration=3};\
\n/system scheduler add name=RePowerUSBv2 interval=7m on-event={/system scheduler remove [find where name=RePowerUSBv2]; /interface lte disable [find]; delay 3s; /interface lte enable [find]};\
\n/system scheduler add name=RePowerUSBv3 interval=15m on-event={/system scheduler remove [find where name=RePowerUSBv3]; /system reboot};" host=1.1.1.1 interval=30s timeout=4s up-script="/system scheduler remove [find where name~\"RePowerUSBv\"];"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment