123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #!/bin/bash
- if [ `whoami` != 'root' ];then
- echo 'please run as root'
- exit 1
- fi
- if [[ ! -f "/etc/gsd/files.list_video_rtsp" ]]; then
- cp $PWD/../source/CNStream/config/files.list_video_rtsp /etc/gsd/
- fi
- if [[ ! -f "/etc/gsd/config.ini" ]]; then
- cp /opt/GSD/source/birdy/config/config.ini /etc/gsd/
- fi
- if [[ ! -f "/etc/profile.d/rtsp.sh" ]]; then
- echo "export rtspip=\"192.168.1.130\"" > /etc/profile.d/rtsp.sh
- fi
- if [[ ! -f "/etc/profile.d/gsdProfile.sh" ]]; then
- echo "export dockerio=\"10.8.0.113:8080\"" > /etc/profile.d/gsdProfile.sh
- fi
- read -p "是否为已部署的设备升级目录结构(yes/no, default is no):" FLASH_SELECT
- if [ -z "${FLASH_SELECT}" ];then
- FLASH_SELECT="no"
- fi
- if [ "${FLASH_SELECT}" == "yes" ];then
- echo "修改"
- if [[ ! -d "/opt/datas/" ]]; then
- mkdir -p /opt/datas/
- fi
- if [[ ! -d "/opt/datas/video" ]]; then
- mkdir -p /opt/datas/video
- fi
- if [[ ! -d "/opt/GSD/video" ]]; then
- if [[ ! -d "/home/sunwin/GSD/video" ]]; then
- echo ""
- else
- echo "转移视频数据"
- mv /home/sunwin/GSD/video/* /opt/datas/video/
- fi
- else
- echo "转移视频数据"
- mv /opt/GSD/video/* /opt/datas/video/
- fi
- fi
- echo "Complete!"
|