aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/ct-bugcheck/src/bugchecker.sh
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/ct-bugcheck/src/bugchecker.sh')
-rwxr-xr-xpackage/utils/ct-bugcheck/src/bugchecker.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/utils/ct-bugcheck/src/bugchecker.sh b/package/utils/ct-bugcheck/src/bugchecker.sh
new file mode 100755
index 0000000000..be305af390
--- /dev/null
+++ b/package/utils/ct-bugcheck/src/bugchecker.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# Periodically call bugcheck.sh script
+
+CHECKER=bugcheck.sh
+SLEEPFOR=60
+
+DO_BUGCHECK=0
+
+# So, to enable this, you create an /etc/config/bugcheck file
+# with contents like:
+# DO_BUGCHECK=1
+# export DO_BUGCHECK
+
+if [ -f /etc/config/bugcheck ]
+ then
+ . /etc/config/bugcheck
+fi
+
+if [ $DO_BUGCHECK == 0 ]
+then
+ exit 0
+fi
+
+while true
+ do
+ $CHECKER
+ sleep $SLEEPFOR
+done