1
0
Fork 0
mirror of https://github.com/mmumshad/ansible-playable.git synced 2025-02-15 04:42:05 +00:00
ansible-playable/helpers/startup.sh

34 lines
1.2 KiB
Bash
Raw Normal View History

2017-07-12 13:49:50 +00:00
#!/usr/bin/env bash
COLOR_GREEN='\033[0;32m'
2017-07-12 13:53:45 +00:00
NC='\033[0m' # No Color
2017-07-12 13:49:50 +00:00
2017-07-12 13:53:45 +00:00
echo -e "${COLOR_GREEN}-----------------------------------------------------"
echo -e " Start SSH Service"
echo -e "-----------------------------------------------------${NC}"
2017-07-12 13:49:50 +00:00
# Start the ssh service. This is required by the playable web server
service ssh start
# Check if volume needs to be mounted from S3
if [[ ${MOUNT_S3} = "True" ]];
then
2017-07-12 13:53:45 +00:00
echo -e "${COLOR_GREEN}-----------------------------------------------------"
echo " Mounting Amazon S3 Bucket to /opt/ansible-projects"
echo -e "-----------------------------------------------------${NC}"
yas3fs s3://${S3_PATH} /opt/ansible-projects -f &
2017-07-12 13:49:50 +00:00
fi
2017-07-12 13:53:45 +00:00
echo -e "${COLOR_GREEN}-----------------------------------------------------"
echo -e " Start MONGODB Service"
echo -e "-----------------------------------------------------${NC}"
2017-07-12 13:49:50 +00:00
# Start MongoDB database in the background
mongod &
2017-07-12 13:53:45 +00:00
echo -e "${COLOR_GREEN}-----------------------------------------------------"
echo -e " Start Web Server"
echo -e "-----------------------------------------------------${NC}"
2017-07-12 13:49:50 +00:00
# Serve web server
gulp serve:dist:no_build