From 974a3c3bf5b71cd6b07c1b4b51044bc535ff4456 Mon Sep 17 00:00:00 2001 From: baigk Date: Wed, 5 Aug 2015 01:31:07 -0400 Subject: support deployment openstack juno with ansible for compass in ubuntu 14.04 JIRA: COMPASS-4 Change-Id: I7adc565325c2a0cbf878b2aea022b31d118748dd Signed-off-by: baigk --- deploy/adapters/ansible/roles/monitor/files/check_service.sh | 7 +++++++ deploy/adapters/ansible/roles/monitor/files/root | 1 + 2 files changed, 8 insertions(+) create mode 100644 deploy/adapters/ansible/roles/monitor/files/check_service.sh create mode 100644 deploy/adapters/ansible/roles/monitor/files/root (limited to 'deploy/adapters/ansible/roles/monitor/files') diff --git a/deploy/adapters/ansible/roles/monitor/files/check_service.sh b/deploy/adapters/ansible/roles/monitor/files/check_service.sh new file mode 100644 index 00000000..0138100c --- /dev/null +++ b/deploy/adapters/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/deploy/adapters/ansible/roles/monitor/files/root b/deploy/adapters/ansible/roles/monitor/files/root new file mode 100644 index 00000000..9c55c4f1 --- /dev/null +++ b/deploy/adapters/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