31 lines
1.1 KiB
Bash
31 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
CONFIG_PATH_MNT="/mnt"
|
|
CONFIG_DEFAULT="/bin/vslocal/config_default.bin"
|
|
CONFIG_TMP_DEFAULT="/tmpfs/config_default.bin"
|
|
CONFIG_DEFFALT_EXCLUDE_FILE="/mnt/config/exclude.lst"
|
|
|
|
producttype=`cat /etc/ipcamera/config_devm.ini | grep ^producttype | awk -F "=" '{printf $2}'`
|
|
|
|
if [ -z $producttype ];then
|
|
exit
|
|
fi
|
|
|
|
if [ $producttype == "29" ] || [ $producttype == "30" ]; then
|
|
echo "============720p============="
|
|
cp /etc/ipcamera/config_devm.ini /etc/ipcamera/conf_720p/
|
|
cp /etc/ipcamera/ipc6000/config_mpmng.ini /etc/ipcamera/conf_720p/
|
|
elif [ $producttype == "31" ];then
|
|
echo "============1080p============="
|
|
cp /etc/ipcamera/config_devm.ini /etc/ipcamera/conf_1080p/
|
|
cp /etc/ipcamera/ipc1080p/config_mpmng.ini /etc/ipcamera/conf_1080p/
|
|
elif [ $producttype == "32" ];then
|
|
echo "============960p============="
|
|
cp /etc/ipcamera/config_devm.ini /etc/ipcamera/conf_960p/
|
|
cp /etc/ipcamera/ipc6000/config_mpmng.ini /etc/ipcamera/conf_960p/
|
|
fi
|
|
|
|
tar -X /mnt/config/exclude.lst -czvf $CONFIG_TMP_DEFAULT $CONFIG_PATH_MNT && cp $CONFIG_TMP_DEFAULT $CONFIG_DEFAULT -raf
|
|
|
|
|