Create watchdog

add watchdog
This commit is contained in:
M0VUB 2022-01-04 14:46:43 +00:00 committed by GitHub
parent c9a956765d
commit b51b5cfa4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
templates/watchdog Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
sleep 5
PATTERN=timed
FILE=/var/log/syslog
if grep -q $PATTERN $FILE;
then
echo "ambed timeout error"
> /var/log/syslog
service ambed restart
else
echo "all ok"
echo "Exiting..."
exit 0
fi