aboutsummaryrefslogtreecommitdiffstats
path: root/package/om-watchdog/files/om-watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'package/om-watchdog/files/om-watchdog')
-rw-r--r--package/om-watchdog/files/om-watchdog15
1 files changed, 15 insertions, 0 deletions
diff --git a/package/om-watchdog/files/om-watchdog b/package/om-watchdog/files/om-watchdog
new file mode 100644
index 0000000000..d730c68447
--- /dev/null
+++ b/package/om-watchdog/files/om-watchdog
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+GPIO=$1
+
+trap "" INT HUP
+
+echo $GPIO > /sys/class/gpio/export
+echo out > /sys/class/gpio/gpio${GPIO}/direction
+
+while true; do
+ echo 1 > /sys/class/gpio/gpio${GPIO}/value
+ sleep 1
+ echo 0 > /sys/class/gpio/gpio${GPIO}/value
+ sleep 180
+done