Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:hardware:watchdog [2020/09/21 10:16] – [USB watchdogs] link fixed vgaetera | docs:guide-user:hardware:watchdog [2021/11/01 11:39] – [USB watchdogs] vgaetera | ||
|---|---|---|---|
| Line 34: | Line 34: | ||
| <code bash> | <code bash> | ||
| # Change timeout to 60s | # Change timeout to 60s | ||
| - | ubus call system watchdog '{ " | + | ubus call system watchdog ' |
| # Change frequency to 1s | # Change frequency to 1s | ||
| - | ubus call system watchdog '{ " | + | ubus call system watchdog ' |
| </ | </ | ||
| - | To stop the service: | + | To bypass procd, enable the magicclose feature, |
| <code bash> | <code bash> | ||
| - | ubus call system watchdog '{ " | + | ubus call system watchdog ' |
| + | ubus call system watchdog ' | ||
| + | while :; do echo 1 > / | ||
| </ | </ | ||
| Note that watchdog will cause a reset after it expires. | Note that watchdog will cause a reset after it expires. | ||
| - | |||
| - | To bypass procd and control the watchdog manually, enable the magicclose feature: | ||
| - | |||
| - | <code bash> | ||
| - | ubus call system watchdog ' | ||
| - | echo 1 > / | ||
| - | </ | ||
| ===== USB watchdogs ===== | ===== USB watchdogs ===== | ||
| Line 70: | Line 65: | ||
| This is a script that will generate a procd service to control one of such USB-serial watchdogs. | This is a script that will generate a procd service to control one of such USB-serial watchdogs. | ||
| - | <code bash usb_watchdog> | + | <code bash> |
| + | cat << " | ||
| #!/bin/sh | #!/bin/sh | ||
| Line 117: | Line 113: | ||
| (install) | (install) | ||
| - | cat << "EOF" > / | + | cat << "EOI" > / |
| #!/bin/sh / | #!/bin/sh / | ||
| Line 132: | Line 128: | ||
| } | } | ||
| - | stop_service() | + | stop_service() { |
| - | { | + | |
| / | / | ||
| } | } | ||
| - | EOF | + | EOI |
| - | cat << "EOF" > / | + | cat << "EOI" > / |
| / | / | ||
| /etc/rc.d/ | /etc/rc.d/ | ||
| / | / | ||
| - | EOF | + | EOI |
| chmod +x / | chmod +x / | ||
| Line 158: | Line 153: | ||
| esac | esac | ||
| + | EOF | ||
| + | chmod +x / | ||
| + | / | ||
| </ | </ | ||
| Line 163: | Line 161: | ||
| <code bash> | <code bash> | ||
| - | wget --no-check-certificate -O / | + | uclient-fetch -O usb-watchdog.sh |
| - | chmod +x /etc/ | + | . ./usb-watchdog.sh |
| - | / | + | |
| </ | </ | ||