~chad.smith/charms/precise/keystone/keystone-health-updates

« back to all changes in this revision

Viewing changes to scripts/health_checks.d/service_running

  • Committer: Chad Smith
  • Date: 2013-02-22 21:05:32 UTC
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: chad.smith@canonical.com-20130222210532-p5bs0nw44nqnl65l
move add_cluster, remove_from_cluster and health_checks.d to a new scripts subdir

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
# Validate that service is running
3
3
HEALTH_DIR=`dirname $0`
4
 
UNIT_DIR=`dirname $HEALTH_DIR`
5
 
. $UNIT_DIR/scriptrc
 
4
SCRIPTS_DIR=`dirname $HEALTH_DIR`
 
5
. $SCRIPTS_DIR/scriptrc
6
6
set -e
7
7
 
8
8
# Grab any OPENSTACK_SERVICE* environment variables
9
9
openstack_service_names=`env| awk -F '=' '(/OPENSTACK_SERVICE/){print $2}'`
10
10
for service_name in $openstack_service_names
11
11
do
12
 
    service $service_name status | grep -q running
 
12
    service $service_name status 2>/dev/null | grep -q running
13
13
done