diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-12 22:16:24 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-12 22:16:24 +0000 |
commit | 89afc3a1d5b86c064e7da32c542d931cb73eca2b (patch) | |
tree | cd733661220fd539d93c1c3156dc1e2a2318d345 /contrib/package/freifunk-watchdog/src/watchdog.h | |
parent | 153d28729894409f19c2455df9ea158ddd1815cd (diff) |
contrib/package/freifunk-watchdog:
- poll /dev/watchdog if available
- also monitor dropbear
Diffstat (limited to 'contrib/package/freifunk-watchdog/src/watchdog.h')
-rw-r--r-- | contrib/package/freifunk-watchdog/src/watchdog.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/package/freifunk-watchdog/src/watchdog.h b/contrib/package/freifunk-watchdog/src/watchdog.h index 7de24210a..f0d620999 100644 --- a/contrib/package/freifunk-watchdog/src/watchdog.h +++ b/contrib/package/freifunk-watchdog/src/watchdog.h @@ -31,6 +31,8 @@ #include <sys/stat.h> #include <sys/ioctl.h> #include <sys/socket.h> +#include <linux/types.h> +#include <linux/watchdog.h> #include "ucix.h" #include "wireless.22.h" @@ -51,6 +53,17 @@ /* Crond error action */ #define CRON_ACTION "/etc/init.d/cron", "/etc/init.d/cron", "restart" +/* SSHd error action */ +#define SSHD_ACTION "/etc/init.d/dropbear", "/etc/init.d/dropbear", "restart" + +/* Watchdog device */ +#define WATCH_DEVICE "/dev/watchdog" +#define WATCH_SHUTDOWN 'V' + +/* System load error action and treshold */ +#define LOAD_TRESHOLD 5.00 +#define LOAD_ACTION "/sbin/reboot" + /* Fallback binary name (passed by makefile) */ #ifndef BINARY #define BINARY "ffwatchd" |