diff options
Diffstat (limited to 'compass/deploy/ansible/roles/monitor/files/check_service.sh')
-rw-r--r-- | compass/deploy/ansible/roles/monitor/files/check_service.sh | 7 |
1 files changed, 7 insertions, 0 deletions
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 |