Fixed supervisor watchdog regex

corrected regex on watchdog script

Change-Id: Ifd7bbf23aaf4b858a88fe849188f95509de0eea8
This commit is contained in:
smarcet 2020-01-30 10:54:19 -03:00
parent ca82e527cf
commit d135337253
1 changed files with 4 additions and 4 deletions

View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash
dt=`date '+%d/%m/%Y %H:%M:%S'`
output=$(supervisorctl status | grep -i ^RUNNING);
output=$(supervisorctl status | grep -i "FATAL")
if test -z "$output"
then
echo "[$dt] - everything running just fine";
echo "[$dt] - everything running just fine"
else
echo "[$dt] - some process has stopped, reloading supervisor";
echo "[$dt] - some process has stopped, reloading supervisor"
echo "$output"
supervisorctl reload;
supervisorctl reload
fi