Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. SETUP_DIR=$HOME/.pio
  4. INSTALLED_FLAG=$SETUP_DIR/installed
  5.  
  6. mkdir -p $SETUP_DIR
  7.  
  8. if [ ! -f $INSTALLED_FLAG ]; then
  9.  
  10. echo "Installing PredictionIO..."
  11. bash -e -c "$(curl -s https://install.prediction.io/install.sh)" 0 -y
  12. if [ $? -ne 0 ]; then
  13.  
  14. echo "ERROR: PredictionIO installation failed."
  15. echo "ERROR: Please try to destory and re-setup VM again by running (in the same current directory):"
  16. echo "ERROR: $ vagrant destroy"
  17. echo "ERROR: (enter y) followed by"
  18. echo "ERROR: $ vagrant up"
  19. echo "ERROR: If problem persists, please use this forum for support:"
  20. echo "ERROR: https://groups.google.com/forum/#!forum/predictionio-user"
  21. exit 1
  22.  
  23. else
  24.  
  25. echo "Finish PredictionIO installation."
  26. touch $INSTALLED_FLAG
  27.  
  28. fi
  29.  
  30. else
  31. echo "PredictionIO already installed. Skip installation."
  32. pio-start-all
  33. echo "--------------------------------------------------------------------------------"
  34. echo -e "\033[1;32mPredictionIO VM is up!\033[0m"
  35. echo "You could run 'pio status' inside VM ('vagrant ssh' to VM first) to confirm if PredictionIO is ready."
  36. echo -e "\033[1;33mIMPORTANT: You still have to start the eventserver manually (inside VM):\033[0m"
  37. echo -e "Run: '\033[1mpio eventserver --ip 0.0.0.0\033[0m'"
  38. echo "--------------------------------------------------------------------------------"
  39. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement