mirror of
https://github.com/ShaYmez/ambed-debian-installer.git
synced 2024-11-21 15:41:48 -05:00
Create watchdog
add watchdog
This commit is contained in:
parent
c9a956765d
commit
b51b5cfa4b
14
templates/watchdog
Normal file
14
templates/watchdog
Normal 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
|
Loading…
Reference in New Issue
Block a user