#!/bin/bash if [ ! -z ${LOGPATH} ] then ln -s ${LOGPATH} /root/.wine/drive_c/services/analis/log fi echo "Starting AnalisServer.exe $@" touch /root/.wine/drive_c/services/analis/log/fatal.log ln -s /root/.wine/drive_c/services/analis/log/fatal.log /root/.wine/drive_c/services/analis/fatal.log tail -f /root/.wine/drive_c/services/analis/log/fatal.log | while read fread; do echo "[fatal.log]: ${fread}"; done & # See Redmine 111631 if [ ! -z ${DEBUG} ] && [ ${DEBUG} == "true" ] then touch /root/.wine/drive_c/services/analis/debug.log tail -f /root/.wine/drive_c/services/analis/debug.log 2> /dev/null | while read fread; do echo "[debug.log]: ${fread}"; :> /root/.wine/drive_c/services/analis/debug.log; done & exec "/usr/bin/xvfb-run" "-a" "wine" "/root/.wine/drive_c/services/analis/AnalisServer.exe" "/debug" "debugfile=/root/.wine/drive_c/services/analis/debug.log" "$@" else exec "/usr/bin/xvfb-run" "-a" "wine" "/root/.wine/drive_c/services/analis/AnalisServer.exe" "$@" fi