1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-02-12 17:11:53 +00:00

Update startup script to skip starting local mongodb if MONGODB_URI is provided

This commit is contained in:
Mumshad Mannambeth 2017-07-12 13:56:58 -04:00
parent 58d5af647d
commit 318f4bb771

View file

@ -20,11 +20,17 @@ if [[ ${MOUNT_S3} = "True" ]];
yas3fs s3://${S3_PATH} /opt/ansible-projects -f &
fi
echo -e "${COLOR_GREEN}-----------------------------------------------------"
echo -e " Start MONGODB Service"
echo -e "-----------------------------------------------------${NC}"
# Start MongoDB database in the background
mongod &
if [[ ${MONGODB_URI} == *"localhost"* || ${MONGODB_URI} == "" ]]
then
echo -e "${COLOR_GREEN}-----------------------------------------------------"
echo -e " Start MONGODB Service"
echo -e "-----------------------------------------------------${NC}"
mongod &
else
echo -e " -------------- Not Starting MONGODB Service -----------"
fi
echo -e "${COLOR_GREEN}-----------------------------------------------------"
echo -e " Start Web Server"