entrypoint.sh 769 B

12345678910111213141516171819
  1. #!/bin/bash
  2. if [ ! -z ${LOGPATH} ]
  3. then
  4. ln -s ${LOGPATH} /opt/analis/log
  5. fi
  6. echo "Starting AnalisServer.exe $@"
  7. touch /opt/analis/log/fatal.log
  8. ln -s /opt/analis/log/fatal.log /opt/analis/fatal.log
  9. tail -n0 -f /opt/analis/log/fatal.log | while read fread; do echo "[fatal.log]: ${fread}"; done &
  10. # See Redmine 111631
  11. if [ ! -z ${DEBUG} ] && [ ${DEBUG} == "true" ]
  12. then
  13. touch /opt/analis/debug.log
  14. 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 &
  15. exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "/debug" "debugfile=/opt/analis/debug.log" "$@"
  16. else
  17. exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "$@"
  18. fi