setup_hhvm.sh 861 B

1234567891011121314151617
  1. #!/bin/bash
  2. fw_depends php nginx composer hhvm
  3. sed -i 's|database_host: .*|database_host: '"${DBHOST}"'|g' app/config/parameters.yml
  4. sed -i 's|SourceRoot = .*/FrameworkBenchmarks/symfony2|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf
  5. sed -i 's|Path = .*/.hhvm.hhbc|Path = '"${TROOT}"'/.hhvm.bbhc|g' deploy/config.hdf
  6. sed -i 's|PidFile = .*/hhvm.pid|PidFile = '"${TROOT}"'/hhvm.pid|g' deploy/config.hdf
  7. sed -i 's|File = .*/error.log|File = '"${TROOT}"'/error.log|g' deploy/config.hdf
  8. sed -i 's|root .*/FrameworkBenchmarks/php-symfony2| root '"${TROOT}"'|g' deploy/nginx.conf
  9. sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
  10. php app/console cache:clear --env=prod --no-debug --no-warmup
  11. php app/console cache:warmup --env=prod --no-debug
  12. hhvm -m daemon --config $TROOT/deploy/config.hdf --user $(whoami)
  13. nginx -c $TROOT/deploy/nginx.conf