pre_start_ruby-2.0 758 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # The pre_start_cartridge and pre_stop_cartridge hooks are *SOURCED*
  3. # immediately before (re)starting or stopping the specified cartridge.
  4. # They are able to make any desired environment variable changes as
  5. # well as other adjustments to the application environment.
  6. # The post_start_cartridge and post_stop_cartridge hooks are executed
  7. # immediately after (re)starting or stopping the specified cartridge.
  8. # Exercise caution when adding commands to these hooks. They can
  9. # prevent your application from stopping cleanly or starting at all.
  10. # Application start and stop is subject to different timeouts
  11. # throughout the system.
  12. echo "-> Pro start ruby step"
  13. if [ -f ${OPENSHIFT_REPO_DIR}/.env ]
  14. then
  15. source ${OPENSHIFT_REPO_DIR}/.env
  16. fi