entrypoint.sh 969 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. if [ ! -z ${LOGPATH} ]
  3. then
  4. ln -s ${LOGPATH} /opt/analis/log
  5. fi
  6. echo "Create symlinks for configs"
  7. for i in $(ls -d /configs/*.{conf,ini}); do ln -sf ${i} /opt/analis/;done
  8. echo "Starting AnalisServer.exe $@"
  9. echo "This file used to shedule healthchecks" > /opt/analis/checkfile.status
  10. touch /opt/analis/log/fatal.log
  11. ln -s /opt/analis/log/fatal.log /opt/analis/fatal.log
  12. tail -n0 -f /opt/analis/log/fatal.log | while read fread; do echo "[fatal.log]: ${fread}"; done &
  13. # See Redmine 111631
  14. if [ ! -z ${DEBUG} ] && [ ${DEBUG} == "true" ]
  15. then
  16. touch /opt/analis/debug.log
  17. 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 &
  18. exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "/app" "/debug" "debugfile=/opt/analis/debug.log" "$@"
  19. else
  20. exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "/app" "$@"
  21. fi