1234567891011121314151617181920212223242526272829303132 |
- #!/bin/bash
- createDir() {
- SHARE_DIR='/root/.wine/dosdevices/unc/samba.infoclinica.lan/smartdelta01'
- [ ! -d ${SHARE_DIR}/Files ] && mkdir ${SHARE_DIR}/Files
- [ ! -d ${SHARE_DIR}/Files/$1 ] && mkdir ${SHARE_DIR}/Files/$1
- }
- if [ ! -z ${LOGPATH} ]
- then
- ln -s ${LOGPATH} /opt/analis/log
- fi
- echo "Create symlinks for configs"
- for i in $(ls -d /configs/*.{conf,ini}); do ln -sf ${i} /opt/analis/;done
- echo "create ARCHIVE Dictionaries IN OUT ERR"
- for i in ARCHIVE Dictionaries IN OUT ERR; do createDir ${i}; done
- echo "Starting AnalisServer.exe $@"
- echo "This file used to shedule healthchecks" > /opt/analis/checkfile.status
- touch /opt/analis/log/fatal.log
- ln -s /opt/analis/log/fatal.log /opt/analis/fatal.log
- tail -n0 -f /opt/analis/log/fatal.log | while read fread; do echo "[fatal.log]: ${fread}"; done &
- # See Redmine 111631
- if [ ! -z ${DEBUG} ] && [ ${DEBUG} == "true" ]
- then
- touch /opt/analis/debug.log
- 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 &
- exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "/app" "/debug" "debugfile=/opt/analis/debug.log" "$@"
- else
- exec "/usr/bin/xvfb-run" "-a" "wine" "/opt/analis/AnalisServer.exe" "/app" "$@"
- fi
|