#!/bin/sh
export LD_LIBRARY_PATH=/opt/jwfs/lib:/opt/jwfs/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export OSG_LIBRARY_PATH=/opt/jwfs/lib/osgPlugins-3.6.5
# 只有在没指定 FG_ROOT 且装了数据包时才设置，
# 否则交给用户的 --fg-root 参数或启动器里选择的数据目录
if [ -z "$FG_ROOT" ] && [ -d /opt/jwfs/fgdata ]; then
  export FG_ROOT=/opt/jwfs/fgdata
fi
exec /opt/jwfs/bin/fgfs "$@"
