move add_cluster, remove_from_cluster and health_checks.d to a new scripts subdir

This commit is contained in:
Chad Smith 2013-02-22 14:05:32 -07:00
parent c8d7c1f6de
commit d05626d26c
5 changed files with 6 additions and 6 deletions

View File

@ -244,7 +244,7 @@ def configure_haproxy(units, service_ports, template_dir=None):
with open(HAPROXY_DEFAULT, 'w') as f:
f.write('ENABLED=1')
def save_script_rc(script_path="scriptrc", **env_vars):
def save_script_rc(script_path="scripts/scriptrc", **env_vars):
"""
Write an rc file in the charm-delivered directory containing
exported environment variables provided by env_vars. Any charm scripts run

View File

@ -1,8 +1,8 @@
#!/bin/bash
# Validate that service ports are active
HEALTH_DIR=`dirname $0`
UNIT_DIR=`dirname $HEALTH_DIR`
. $UNIT_DIR/scriptrc
SCRIPTS_DIR=`dirname $HEALTH_DIR`
. $SCRIPTS_DIR/scriptrc
set -e
# Grab any OPENSTACK_PORT* environment variables

View File

@ -1,13 +1,13 @@
#!/bin/bash
# Validate that service is running
HEALTH_DIR=`dirname $0`
UNIT_DIR=`dirname $HEALTH_DIR`
. $UNIT_DIR/scriptrc
SCRIPTS_DIR=`dirname $HEALTH_DIR`
. $SCRIPTS_DIR/scriptrc
set -e
# Grab any OPENSTACK_SERVICE* environment variables
openstack_service_names=`env| awk -F '=' '(/OPENSTACK_SERVICE/){print $2}'`
for service_name in $openstack_service_names
do
service $service_name status | grep -q running
service $service_name status 2>/dev/null | grep -q running
done