puppet-openstackid/templates/supervisor_watchdog.sh.erb

13 lines
306 B
Plaintext

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