From 9a4b19bd1110a15cbbddd715323197931dbe0d3d Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 13 Jul 2015 14:05:22 -0400 Subject: [PATCH] Update start/stop service script ordering Mongo needs to be last when starting and first when stopping if enabled --- tools/scripts/ansible-tower-service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/scripts/ansible-tower-service b/tools/scripts/ansible-tower-service index 64c60b0a55..5b73b1ff11 100755 --- a/tools/scripts/ansible-tower-service +++ b/tools/scripts/ansible-tower-service @@ -16,8 +16,10 @@ service_action() { # Should MongoDB be managed by this script? # We only manage MongoDB if the license uses it. tower-manage uses_mongo > /dev/null 2> /dev/null - if [ $? == 0 ]; then + if [ $? == 0 && ${1} == start ]; then SERVICES="$SERVICES mongod" + elif [ $? == 0 && ${1} == stop ]; then + SERVICES="mongod $SERVICES" fi for svc in ${SERVICES}; do