entrypoint.sh 860 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if [ ! -z ${LOGPATH} ]
  3. then
  4. ln -s ${LOGPATH} /opt/analis/log
  5. fi
  6. echo "Starting AnalisServer.exe $@"
  7. echo "This file used to shedule healthchecks" > /opt/analis/checkfile.status
  8. touch /opt/analis/log/fatal.log
  9. ln -s /opt/analis/log/fatal.log /opt/analis/fatal.log
  10. tail -n0 -f /opt/analis/log/fatal.log | while read fread; do echo "[fatal.log]: ${fread}"; done &
  11. # See Redmine 111631
  12. if [ ! -z ${DEBUG} ] && [ ${DEBUG} == "true" ]
  13. then
  14. touch /opt/analis/debug.log
  15. tail -f /opt/analis/debug.log 2> /dev/null | while read fread; do echo "[debug.log]: ${fread}"; :> /root/.wine/drive_c/services/analis/debug.log; done &
  16. exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "/app" "/debug" "debugfile=/opt/analis/debug.log" "$@"
  17. else
  18. exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "/app" "$@"
  19. fi