From 543130927ba40a174e8674cca66ae442d5056d76 Mon Sep 17 00:00:00 2001 From: Jonas Bjurel Date: Sat, 3 Oct 2015 17:34:24 +0200 Subject: Moving tag arno.2015.2.0 from genesis to fuel/stable/arno Change-Id: I01b5f9f9125756d80d7ca666bb6d994f2b13d2a0 Signed-off-by: Jonas Bjurel --- compass/deploy/ansible/roles/monitor/files/check_service.sh | 7 +++++++ compass/deploy/ansible/roles/monitor/files/root | 1 + 2 files changed, 8 insertions(+) create mode 100644 compass/deploy/ansible/roles/monitor/files/check_service.sh create mode 100644 compass/deploy/ansible/roles/monitor/files/root (limited to 'compass/deploy/ansible/roles/monitor/files') diff --git a/compass/deploy/ansible/roles/monitor/files/check_service.sh b/compass/deploy/ansible/roles/monitor/files/check_service.sh new file mode 100644 index 000000000..d30967343 --- /dev/null +++ b/compass/deploy/ansible/roles/monitor/files/check_service.sh @@ -0,0 +1,7 @@ +#!/bin/bash +services=`cat /opt/service | uniq` +for service in $services; do + if [ `/sbin/initctl list|awk '/stop\/waiting/{print $1}'|uniq | grep $service` ]; then + /sbin/start $service + fi +done diff --git a/compass/deploy/ansible/roles/monitor/files/root b/compass/deploy/ansible/roles/monitor/files/root new file mode 100644 index 000000000..9c55c4f16 --- /dev/null +++ b/compass/deploy/ansible/roles/monitor/files/root @@ -0,0 +1 @@ +* * * * * /usr/local/bin/check_service.sh >> /var/log/check_service.log 2>&1 -- cgit 1.2.3-korg