mirror of
https://github.com/ansible/awx.git
synced 2026-05-25 01:27:45 -02:30
@@ -13,29 +13,8 @@ fi
|
||||
service_action() {
|
||||
SERVICES=$TOWER_SERVICES
|
||||
|
||||
# When determining whether mongod is required, postgres is required. The
|
||||
# following ensures mongod is started after postgres, and stopped before
|
||||
# postgres.
|
||||
case ${1} in
|
||||
start|status)
|
||||
SERVICES="$SERVICES mongod"
|
||||
;;
|
||||
stop)
|
||||
SERVICES="mongod $SERVICES"
|
||||
;;
|
||||
esac
|
||||
|
||||
for svc in ${SERVICES}; do
|
||||
|
||||
# Determine whether mongod is needed
|
||||
if [[ ${svc} == mongod ]]; then
|
||||
tower-manage uses_mongo --local 2> /dev/null >/dev/null
|
||||
# if mongod is not required, break
|
||||
if [ $? -ne 0 ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
service ${svc} $1
|
||||
this_return=$?
|
||||
if [ $this_return -gt $worst_return ]; then
|
||||
|
||||
Reference in New Issue
Block a user