You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/package/utils/ct-bugcheck/src/bugchecker.sh

30 lines
389 B
Bash

#!/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