setup_hhvm.sh 814 B

1234567891011121314151617
  1. #!/bin/bash
  2. export PHP_HOME=${IROOT}/php-5.5.17
  3. export PHP_FPM=${PHP_HOME}/sbin/php-fpm
  4. export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
  5. export NGINX_HOME=${IROOT}/nginx
  6. sed -i 's|host=localhost;|host='"${DBHOST}"';|g' once.php.inc
  7. sed -i 's|SourceRoot = .*/FrameworkBenchmarks/hhvm|SourceRoot = '"${TROOT}"'|g' deploy/config.hdf
  8. sed -i 's|Path = .*/.hhvm.hhbc|Path = '"${TROOT}"'/.hhvm.bbhc|g' deploy/config.hdf
  9. sed -i 's|PidFile = .*/hhvm.pid|PidFile = '"${TROOT}"'/hhvm.pid|g' deploy/config.hdf
  10. sed -i 's|File = .*/error.log|File = '"${TROOT}"'/error.log|g' deploy/config.hdf
  11. sed -i "s|/usr/local/nginx/|${IROOT}/nginx/|g" deploy/nginx.conf
  12. sed -i "s|TEST_ROOT|${TROOT}|g" deploy/nginx.conf
  13. hhvm --config $TROOT/deploy/config.hdf --user $(whoami) -m daemon
  14. $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf