docker-entrypoint.sh 718 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. set -e
  3. sed -i "s/a = demo_99/a = ${ALIAS}/" /opt/report/report.conf
  4. sed -i "s/port = 8882/port = ${PORT}/" /opt/report/report.conf
  5. sed -i "s/grpid = 9901/grpid = ${GRPID}/" /opt/report/report.conf
  6. mkdir /opt/report/log/
  7. echo `date` Starting ReportServer >> /opt/report/log/report_server.log
  8. tail -f /opt/report/log/report_server.log &
  9. if [ ! -z ${DEBUG} ] && [ ${DEBUG} == "true" ]
  10. then
  11. touch /opt/report/log/debug.log
  12. tail -f /opt/report/log/debug.log 2> /dev/null | while read fread; do echo "[debug.log]: ${fread}"; :> /opt/report/log/debug.log; done &
  13. exec "xvfb-run" "-a" "wine" "/opt/report/ReportServer.exe" "/debug" "debugfile=/opt/report/log/debug.log"
  14. else
  15. exec "$@"
  16. fi