Commit 430e719a authored by 黄振令's avatar 黄振令

【修改内容】1. 程序运行工作目录定在/usr/kk, tsl和dev_config_table配置文件也放在该文件下;2.启动脚本判断该目录是否存在,没存在创建且从/home/kk拷贝配置文件

parent 740f213d
...@@ -3,32 +3,41 @@ nanomsg_File="/home/kk/lib/libnanomsg.so.5" ...@@ -3,32 +3,41 @@ nanomsg_File="/home/kk/lib/libnanomsg.so.5"
ev_File="/home/kk/lib/libev.so.4" ev_File="/home/kk/lib/libev.so.4"
sqlite_File="/home/kk/lib/libsqlite3.so.0" sqlite_File="/home/kk/lib/libsqlite3.so.0"
run_Dir="/" run_Dir="/usr/kk"
dev_cfg_Dir="${run_Dir}/ZB/dev_config_table" tsl_Dir="${run_Dir}/tsl"
dev_cfg_Dir="${run_Dir}/dev_config_table"
cd /sbin/ cd /sbin/
insmod /sbin/ssd1306-revision.ko insmod /sbin/ssd1306-revision.ko
/sbin/oled >/dev/null 2>&1 & /sbin/oled >/dev/null 2>&1 &
sleep 1 sleep 1
if [ ! -d "$run_Dir" ]; then
mkdir ${run_Dir}
fi
if [ ! -d "$tsl_Dir" ]; then
cp -rf /home/kk/tsl ${run_Dir}/
fi
if [ ! -d "$dev_cfg_Dir" ]; then if [ ! -d "$dev_cfg_Dir" ]; then
mkdir /ZB cp -rf /home/kk/dev_config_table ${run_Dir}
cp -rf /home/kk/dev_config_table /ZB sleep 1
cp -rf /home/kk/dev_map_table.json /ZB
fi fi
sleep 1
export LD_LIBRARY_PATH=/home/kk/lib export LD_LIBRARY_PATH=/home/kk/lib
cd /home/kk/lib cd /home/kk/lib
if [ ! -f "$nanomsg_File" ]; then if [ ! -f "$nanomsg_File" ]; then
ln -s libnanomsg.so /lib/libnanomsg.so.5 ln -sf /home/kk/lib/libnanomsg.so /lib/libnanomsg.so.5
fi fi
if [ ! -f "$ev_File" ]; then if [ ! -f "$ev_File" ]; then
ln -s libev.so /lib/libev.so.4 ln -sf /home/kk/lib/libev.so /lib/libev.so.4
fi fi
if [ ! -f "$sqlite_File" ]; then if [ ! -f "$sqlite_File" ]; then
ln -s libsqlite3.so /lib/libsqlite3.so.0 ln -sf /home/kk/lib/libsqlite3.so /lib/libsqlite3.so.0
fi fi
...@@ -41,9 +50,9 @@ export LD_LIBRARY_PATH=/home/kk/lib ...@@ -41,9 +50,9 @@ export LD_LIBRARY_PATH=/home/kk/lib
cd ${run_Dir} cd ${run_Dir}
/home/kk/kk_midware >/dev/null 2>&1 & /home/kk/kk_midware >/dev/null 2>&1 &
sleep 1
/home/kk/kcloud >/dev/null 2>&1 & /home/kk/kcloud >/dev/null 2>&1 &
/home/kk/Z3GatewayHost -f x -p /dev/ttyS0 >/dev/null 2>&1 & /home/kk/Z3GatewayHost -f x -p /dev/ttyS0 >/dev/null 2>&1 &
sleep 5
/home/kk/process_check.sh >/dev/null 2>&1 & /home/kk/process_check.sh >/dev/null 2>&1 &
......
...@@ -208,7 +208,7 @@ package: ...@@ -208,7 +208,7 @@ package:
cp -rf $(TOP_DIR)/process_check.sh $(TOP_DIR)/$(releaseDir)/ cp -rf $(TOP_DIR)/process_check.sh $(TOP_DIR)/$(releaseDir)/
cp -rf $(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_config_table $(TOP_DIR)/$(releaseDir)/ cp -rf $(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_config_table $(TOP_DIR)/$(releaseDir)/
cp -rf $(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_map_table.json $(TOP_DIR)/$(releaseDir)/ cp -rf $(TOP_DIR)/platform/zigbee/app/builder/Z3GatewayHost/ZB/dev_map_table.json $(TOP_DIR)/$(releaseDir)/dev_config_table/
ifeq ($(CONFIG_VENDOR),ubuntu) ifeq ($(CONFIG_VENDOR),ubuntu)
cp -rf $(TOP_DIR)/common/nanomsg/libnanomsg_ubuntu.so $(TOP_DIR)/$(releaseDir)/lib/libnanomsg.so.5 cp -rf $(TOP_DIR)/common/nanomsg/libnanomsg_ubuntu.so $(TOP_DIR)/$(releaseDir)/lib/libnanomsg.so.5
cp -rf $(TOP_DIR)/common/ev/libev_ubuntu.so $(TOP_DIR)/$(releaseDir)/lib cp -rf $(TOP_DIR)/common/ev/libev_ubuntu.so $(TOP_DIR)/$(releaseDir)/lib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment