You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
813 B

  1. #!/bin/bash
  2. # Creating customize folder
  3. mkdir -p customize
  4. [[ ! "$(ls -A customize)" ]] && echo "Creating customize folder" \
  5. && cp -R customize.dist/* customize/ \
  6. && cp config.js.dist customize/config.js
  7. # Linking config.js
  8. [[ ! -h config.js ]] && echo "Linking config.js" && ln -s customize/config.js config.js
  9. # Configure
  10. [[ -n "$USE_SSL" ]] && echo "Using secure websockets: $USE_SSL" \
  11. && sed -i "s/useSecureWebsockets: .*/useSecureWebsockets: ${USE_SSL},/g" customize/config.js
  12. [[ -n "$USE_SSL" ]] && echo "Using storage adapter: $STORAGE" \
  13. && sed -i "s/storage: .*/storage: ${STORAGE},/g" customize/config.js
  14. [[ -n "$LOG_TO_STDOUT" ]] && echo "Logging to stdout: $LOG_TO_STDOUT" \
  15. && sed -i "s/logToStdout: .*/logToStdout: ${LOG_TO_STDOUT},/g" customize/config.js
  16. exec node ./server.js