#!/bin/sh
# script that runs on system startup
# 2013-09-26 09:30 created by niujiuru

. $(dirname $0)/set_env
. $(dirname $0)/modules/funcs/functions.sh
export_env

# 重置海康相机(1200W海康U口相机在RTU板子上冷启动时, 需要先重置相机, 才能正常工作)
HKCAM_RESET="${APPBINS_PATH}/hkcam_reset.out"
if [ -e "$HKCAM_RESET" ]; then
  chmod a+x "$HKCAM_RESET"
  "$HKCAM_RESET"
  sleep 5
fi

# 启动主应用程序模块
ORDER="
rtu_linux_modules
daemon
"

for m in ${ORDER}
do
  echo ":: starting $m"
  call_module "$m" start
done
