rootfs_enc1v2_hi3520d_20230630
This commit is contained in:
		
							parent
							
								
									877317826b
								
							
						
					
					
						commit
						abf7fe89b0
					
				
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1,4 +1,12 @@
 | 
			
		|||
[
 | 
			
		||||
  {
 | 
			
		||||
    "version": "2.3.0 build 20230630",
 | 
			
		||||
    "logs": [
 | 
			
		||||
      "修正无效推流地址导致的内存占用增加问题",
 | 
			
		||||
      "修正输出设置页面,播放地址显示问题",
 | 
			
		||||
      "新增通过升级包方式升级后恢复用户设置功能"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "version": "2.2.0 build 20230531",
 | 
			
		||||
    "logs": [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
{
 | 
			
		||||
    "app": "2.0.0 build 20220512_869",
 | 
			
		||||
    "sdk": "2.0.0 build 20220518_20716",
 | 
			
		||||
    "sys": "2.2.0 build 20230531"
 | 
			
		||||
    "sys": "2.3.0 build 20230630"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,10 @@
 | 
			
		|||
/link/shell/tester.sh &
 | 
			
		||||
/link/shell/trans.sh &
 | 
			
		||||
while [ true ]
 | 
			
		||||
do
 | 
			
		||||
pkill Monitor
 | 
			
		||||
if [ -f "/root/usb/Tester" ]; then
 | 
			
		||||
chmod 777 /root/usb/Tester
 | 
			
		||||
/root/usb/Tester
 | 
			
		||||
else
 | 
			
		||||
/link/bin/Encoder
 | 
			
		||||
fi
 | 
			
		||||
sleep 2
 | 
			
		||||
done  
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,10 +18,11 @@ if [ -b /dev/mmcblk0p6 ]; then
 | 
			
		|||
	mnt=`df -h | grep /dev/mmcblk0p6 | wc -l`
 | 
			
		||||
	if [ "$mnt" == "0" ];then
 | 
			
		||||
	    echo -e "\ny" | mkfs.ext4 -T largefile /dev/mmcblk0p6
 | 
			
		||||
	    if [ ! -b /dev/sda1 ];then
 | 
			
		||||
	        /bin/mount -o rw,sync,barrier=0 /dev/mmcblk0p6 /root/usb
 | 
			
		||||
    	    fi
 | 
			
		||||
 	fi
 | 
			
		||||
    fi
 | 
			
		||||
    umount -f /root/usb/
 | 
			
		||||
    if [ ! -b /dev/sda1 ];then
 | 
			
		||||
	/bin/mount -o rw,sync,barrier=0 /dev/mmcblk0p6 /root/usb
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,8 @@
 | 
			
		|||
. /link/shell/util/func.sh
 | 
			
		||||
jopen /link/config/service.json
 | 
			
		||||
 | 
			
		||||
/link/bin/rtc -g time
 | 
			
		||||
 | 
			
		||||
if [ `jget telnet` == "true" ]; then
 | 
			
		||||
/usr/sbin/telnetd
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,8 @@
 | 
			
		|||
if [ ! -z "$(ls -A /link/update)" ]; then
 | 
			
		||||
 | 
			
		||||
    cp -rd /link/config /tmp/history_config
 | 
			
		||||
    rm -rf /tmp/history_config/misc/timezone/zoneinfo
 | 
			
		||||
    
 | 
			
		||||
    mv /link/update/* /link/update/update.tar
 | 
			
		||||
    tar -xof /link/update/update.tar -C /
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			@ -30,6 +34,13 @@ if [ ! -z "$(ls -A /link/update)" ]; then
 | 
			
		|||
 | 
			
		||||
    rm /link/update/*
 | 
			
		||||
 | 
			
		||||
    if [ ! -f "/link/config/auto/no_user_setting" ]; then
 | 
			
		||||
	/usr/php/bin/php /link/web/link/timer/healConf.php
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    rm -rf /tmp/history_config
 | 
			
		||||
    rm /link/config/auto/no_user_setting
 | 
			
		||||
 | 
			
		||||
    if [ -f "/link/config/reboot" ]; then
 | 
			
		||||
        rm /link/config/reboot
 | 
			
		||||
        reboot
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,54 @@
 | 
			
		|||
if [ ! -z "$(ls -A /link/update)" ]; then
 | 
			
		||||
 | 
			
		||||
    mkdir /tmp/history/misc/timezone
 | 
			
		||||
    cp -rd /link/config/config.json /link/config/push.json /link/config/record.json /tmp/history/
 | 
			
		||||
    cp -rd /link/config/button.json /link/config/defLays.json /link/config/port.json /tmp/history/
 | 
			
		||||
    cp -rd /link/config/lang.json /link/config/videoBuffer.json /link/config/ntp.json /tmp/history/
 | 
			
		||||
    cp -rd /link/config/uart.json /link/config/intercom.json /tmp/history/
 | 
			
		||||
    cp -rd /link/config/misc/timezone/tzselect.json /tmp/history/misc/timezone/
 | 
			
		||||
 | 
			
		||||
    mv /link/update/* /link/update/update.tar
 | 
			
		||||
    tar -xof /link/update/update.tar -C /
 | 
			
		||||
    
 | 
			
		||||
    sleep 1
 | 
			
		||||
    if [ -c "/dev/mtd1" ]; then
 | 
			
		||||
        if [ -f "/link/update/kernel" ]; then
 | 
			
		||||
            flash_erase /dev/mtd1 0 0
 | 
			
		||||
            nandwrite -p /dev/mtd1 /link/update/kernel
 | 
			
		||||
        fi
 | 
			
		||||
        if [ -f "/link/update/logo.bin" ]; then
 | 
			
		||||
            flash_erase /dev/mtd2 0 0
 | 
			
		||||
            nandwrite -p /dev/mtd2 /link/update/logo.bin
 | 
			
		||||
        fi
 | 
			
		||||
        if [ -f "/link/update/logo.jpg" ]; then
 | 
			
		||||
            flash_erase /dev/mtd3 0 0
 | 
			
		||||
            nandwrite -p /dev/mtd3 /link/update/logo.jpg
 | 
			
		||||
        fi
 | 
			
		||||
    else
 | 
			
		||||
        if [ -f "/link/update/kernel" ]; then
 | 
			
		||||
            dd if=/link/update/kernel of=/dev/mmcblk0p2
 | 
			
		||||
        fi
 | 
			
		||||
        if [ -f "/link/update/logo.bin" ]; then
 | 
			
		||||
            dd if=/link/update/logo.bin of=/dev/mmcblk0p3
 | 
			
		||||
        fi
 | 
			
		||||
        if [ -f "/link/update/logo.jpg" ]; then
 | 
			
		||||
            dd if=/link/update/logo.jpg of=/dev/mmcblk0p4
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    rm /link/update/*
 | 
			
		||||
 | 
			
		||||
    if [ -f "/link/config/reboot" ]; then
 | 
			
		||||
        rm /link/config/reboot
 | 
			
		||||
        reboot
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -f "/link/shell/runOnce.sh" ]; then
 | 
			
		||||
    chmod 777 /link/shell/runOnce.sh
 | 
			
		||||
    /link/shell/runOnce.sh
 | 
			
		||||
    rm /link/shell/runOnce.sh
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -280,9 +280,9 @@ function changeType() {
 | 
			
		|||
	exec( 'echo '.$_POST[ 'type' ].' > /link/config/fac' );
 | 
			
		||||
	exec( 'cp /link/fac/'.$_POST[ 'type' ].'/* /link/ -rd' );
 | 
			
		||||
	exec( 'chmod 777 /link -R' );
 | 
			
		||||
	exec( 'pkill Encoder' );
 | 
			
		||||
	exec('rm -f /link/config/record.json');
 | 
			
		||||
	exec('rm -rf /link/config/auto/*');
 | 
			
		||||
    exec( 'pkill Encoder' );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function delFile() {
 | 
			
		||||
| 
						 | 
				
			
			@ -446,8 +446,8 @@ function checkHelpNet() {
 | 
			
		|||
 | 
			
		||||
function checkUpdate() {
 | 
			
		||||
	global $result,$server;
 | 
			
		||||
 | 
			
		||||
	$fac = file_get_contents("/link/config/fac");
 | 
			
		||||
    $hardware = json_decode(file_get_contents('/link/config/hardware.json'), true);
 | 
			
		||||
    $fac = $hardware["fac"];
 | 
			
		||||
	$fac = str_replace("\n","",$fac);
 | 
			
		||||
	if(is_null($fac) || $fac == "") {
 | 
			
		||||
		$result->error = "<cn>获取机型错误</cn><en>Error getting model</en>";
 | 
			
		||||
| 
						 | 
				
			
			@ -466,7 +466,8 @@ function checkUpdate() {
 | 
			
		|||
 | 
			
		||||
function getPatch() {
 | 
			
		||||
	global $result,$server;
 | 
			
		||||
	$fac = file_get_contents("/link/config/fac");
 | 
			
		||||
    $hardware = json_decode(file_get_contents('/link/config/hardware.json'), true);
 | 
			
		||||
    $fac = $hardware["fac"];
 | 
			
		||||
	$fac = str_replace("\n","",$fac);
 | 
			
		||||
	if(is_null($fac) || $fac == "") {
 | 
			
		||||
		$result->error = "<cn>获取机型错误</cn><en>Error getting model</en>";
 | 
			
		||||
| 
						 | 
				
			
			@ -484,7 +485,8 @@ function getPatch() {
 | 
			
		|||
 | 
			
		||||
function getPatchBySn() {
 | 
			
		||||
	global $result,$server;
 | 
			
		||||
	$fac = file_get_contents("/link/config/fac");
 | 
			
		||||
    $hardware = json_decode(file_get_contents('/link/config/hardware.json'), true);
 | 
			
		||||
    $fac = $hardware["fac"];
 | 
			
		||||
	$fac = str_replace("\n","",$fac);
 | 
			
		||||
	if(is_null($fac) || $fac == "") {
 | 
			
		||||
		$result->error = "<cn>获取机型错误</cn><en>Error getting model</en>";
 | 
			
		||||
| 
						 | 
				
			
			@ -500,7 +502,8 @@ function getPatchBySn() {
 | 
			
		|||
 | 
			
		||||
function getAliase() {
 | 
			
		||||
	global $result,$server;
 | 
			
		||||
	$fac = file_get_contents("/link/config/fac");
 | 
			
		||||
    $hardware = json_decode(file_get_contents('/link/config/hardware.json'), true);
 | 
			
		||||
    $fac = $hardware["fac"];
 | 
			
		||||
	$fac = str_replace("\n","",$fac);
 | 
			
		||||
	if(is_null($fac) || $fac == "") {
 | 
			
		||||
		$result->error = "<cn>获取机型错误</cn><en>Error getting model</en>";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,77 @@
 | 
			
		|||
<?php
 | 
			
		||||
function getConfFiles($dir) {
 | 
			
		||||
    $files = array();
 | 
			
		||||
    $handle = opendir($dir);
 | 
			
		||||
 | 
			
		||||
    while (($file = readdir($handle)) !== false) {
 | 
			
		||||
        if ($file !== '.' && $file !== '..') {
 | 
			
		||||
            $filePath = $dir . '/' . $file;
 | 
			
		||||
 | 
			
		||||
            if (is_dir($filePath)) {
 | 
			
		||||
                $files = array_merge($files, getConfFiles($filePath));
 | 
			
		||||
            } else {
 | 
			
		||||
                $files[] = $filePath;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    closedir($handle);
 | 
			
		||||
    return $files;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function copyUserSettings(&$historyConfig, &$currentConfig,&$level=0) {
 | 
			
		||||
    if (is_array($historyConfig) && is_array($currentConfig)) {
 | 
			
		||||
 | 
			
		||||
        if($level == 0 && (count($historyConfig) != count($currentConfig)))
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
        foreach ($historyConfig as $key => $value) {
 | 
			
		||||
            if (is_array($value) && is_array($currentConfig[$key]) ||
 | 
			
		||||
                is_object($value) && is_object($currentConfig[$key])
 | 
			
		||||
            ) {
 | 
			
		||||
                $level++;
 | 
			
		||||
                copyUserSettings($value, $currentConfig[$key],$level);
 | 
			
		||||
            } else {
 | 
			
		||||
                $currentConfig[$key] = $value;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    } elseif (is_object($historyConfig) && is_object($currentConfig)) {
 | 
			
		||||
 | 
			
		||||
        foreach ($historyConfig as $key => $value) {
 | 
			
		||||
            if (isset($currentConfig->$key)) {
 | 
			
		||||
                if (is_array($value) && is_array($currentConfig->$key) ||
 | 
			
		||||
                    is_object($value) && is_object($currentConfig->$key)
 | 
			
		||||
                ) {
 | 
			
		||||
                    $level++;
 | 
			
		||||
                    copyUserSettings($value, $currentConfig->$key,$level);
 | 
			
		||||
                } else {
 | 
			
		||||
                    $currentConfig->$key = $value;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$configFiles = getConfFiles('/tmp/history_config');
 | 
			
		||||
foreach ($configFiles as $historyFile) {
 | 
			
		||||
    $currentFile = str_replace("/tmp/history_config/","/link/config/",$historyFile);
 | 
			
		||||
    if(md5_file($historyFile) == md5_file($currentFile))
 | 
			
		||||
        continue;
 | 
			
		||||
 | 
			
		||||
    if(!strpos($currentFile, ".json") || strpos($currentFile, "version.json") ||
 | 
			
		||||
        strpos($currentFile, "net.json") || strpos($currentFile, "net2.json") || strpos($currentFile, "netEx.json"))
 | 
			
		||||
        continue;
 | 
			
		||||
 | 
			
		||||
    echo $currentFile."\n";
 | 
			
		||||
 | 
			
		||||
    $historyCtx = json_decode(file_get_contents($historyFile));
 | 
			
		||||
    $currentCtx = json_decode(file_get_contents($currentFile));
 | 
			
		||||
 | 
			
		||||
    copyUserSettings($historyCtx,$currentCtx);
 | 
			
		||||
 | 
			
		||||
    if(empty($currentCtx))
 | 
			
		||||
        continue;
 | 
			
		||||
 | 
			
		||||
    file_put_contents($currentFile, json_encode($currentCtx, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
 | 
			
		||||
    exec("sync");
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -153,6 +153,7 @@ include("head.php");
 | 
			
		|||
										<option value="1366x768_60">1366x768_60</option>
 | 
			
		||||
										<option value="1280x1024_60">1280x1024_60</option>
 | 
			
		||||
										<option value="1280x800_60">1280x800_60</option>
 | 
			
		||||
                                        <option value="1024x768_60">1024x768_60</option>
 | 
			
		||||
										<option value="800x600_60">800x600_60</option>
 | 
			
		||||
										<option value="576P50">576P50</option>
 | 
			
		||||
										<option value="480P60">480P60</option>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -737,22 +737,30 @@ else
 | 
			
		|||
						<cn>频道名称</cn>
 | 
			
		||||
						<en>channel name</en>
 | 
			
		||||
					</div>
 | 
			
		||||
                    <div class="col-md-2 col-xs-2">
 | 
			
		||||
                        <cn>主码流标识</cn>
 | 
			
		||||
                        <en>Main Suffix</en>
 | 
			
		||||
                    <div class="col-md-5 col-xs-5">
 | 
			
		||||
                        <div class="row">
 | 
			
		||||
                            <div class="col-md-3 col-xs-3">
 | 
			
		||||
                                <cn>主码流标识</cn>
 | 
			
		||||
                                <en>Main Suffix</en>
 | 
			
		||||
                            </div>
 | 
			
		||||
                            <div class="col-md-9 col-xs-9">
 | 
			
		||||
                                <cn>主流地址</cn>
 | 
			
		||||
                                <en>Main URL</en>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
					<div class="col-md-3 col-xs-3">
 | 
			
		||||
						<cn>主流地址</cn>
 | 
			
		||||
						<en>Main URL</en>
 | 
			
		||||
					</div>
 | 
			
		||||
                    <div class="col-md-2 col-xs-2">
 | 
			
		||||
                        <cn>辅码流标识</cn>
 | 
			
		||||
                        <en>Sub Suffix</en>
 | 
			
		||||
                    <div class="col-md-5 col-xs-5">
 | 
			
		||||
                        <div class="row">
 | 
			
		||||
                            <div class="col-md-3 col-xs-3">
 | 
			
		||||
                                <cn>辅码流标识</cn>
 | 
			
		||||
                                <en>Sub Suffix</en>
 | 
			
		||||
                            </div>
 | 
			
		||||
                            <div class="col-md-9 col-xs-9">
 | 
			
		||||
                                <cn>辅流地址</cn>
 | 
			
		||||
                                <en>Sub URL</en>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
					<div class="col-md-3 col-xs-3">
 | 
			
		||||
						<cn>辅流地址</cn>
 | 
			
		||||
						<en>Sub URL</en>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
				<hr style="margin-top:5px; margin-bottom: 10px;"/>
 | 
			
		||||
				<div id="templetURL">
 | 
			
		||||
| 
						 | 
				
			
			@ -760,20 +768,27 @@ else
 | 
			
		|||
						<div class="col-md-2 col-xs-2">
 | 
			
		||||
							<input zcfg="[#].name" type="text" class="form-control">
 | 
			
		||||
						</div>
 | 
			
		||||
                        <div class="col-md-2 col-xs-2">
 | 
			
		||||
                            <input zcfg="[#].mainSuffix" type="text" class="form-control">
 | 
			
		||||
                        <div class="col-md-5 col-xs-5">
 | 
			
		||||
                            <div class="row">
 | 
			
		||||
                                <div class="col-md-3 col-xs-3">
 | 
			
		||||
                                    <input zcfg="[#].mainSuffix" type="text" class="form-control">
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="col-md-9 col-xs-9">
 | 
			
		||||
                                    <div class="well well-sm mainUrl"></div>
 | 
			
		||||
                                </div>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
						<div class="col-md-3 col-xs-3">
 | 
			
		||||
							<div class="well well-sm mainUrl">
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
                        <div class="col-md-2 col-xs-2">
 | 
			
		||||
                            <input zcfg="[#].subSuffix" type="text" class="form-control">
 | 
			
		||||
 | 
			
		||||
                        <div class="col-md-5 col-xs-5">
 | 
			
		||||
                            <div class="row">
 | 
			
		||||
                                <div class="col-md-3 col-xs-3">
 | 
			
		||||
                                    <input zcfg="[#].subSuffix" type="text" class="form-control">
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="col-md-9 col-xs-9">
 | 
			
		||||
                                    <div class="well well-sm subUrl"></div>
 | 
			
		||||
                                </div>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
						<div class="col-md-3 col-xs-3">
 | 
			
		||||
							<div class="well well-sm subUrl">
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
					<hr style="margin-top:10px; margin-bottom: 10px;"/>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -888,13 +903,15 @@ else
 | 
			
		|||
			} );
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		function getport(list){
 | 
			
		||||
		function getport(list,type){
 | 
			
		||||
			if(list[2]!=list[0])
 | 
			
		||||
				return ":"+list[2];
 | 
			
		||||
			else if(list[1]!=list[0])
 | 
			
		||||
				return ":"+list[1];
 | 
			
		||||
			else
 | 
			
		||||
				return list[0];
 | 
			
		||||
			else if((type == "http" && list[0] == 80) || (type == "rtsp" && list[0] == 554) || (type == "rtmp" && list[0] == 1935) || (type == "httpts" && list[0] == 8090))
 | 
			
		||||
                return "";
 | 
			
		||||
            else
 | 
			
		||||
				return ":"+list[0];
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		function transURL(str)
 | 
			
		||||
| 
						 | 
				
			
			@ -906,8 +923,8 @@ else
 | 
			
		|||
				var url=list[i];
 | 
			
		||||
				if(url.indexOf("http")==0){
 | 
			
		||||
					if(url.indexOf("///live")>0){
 | 
			
		||||
						var port=getport(portCfg.http);
 | 
			
		||||
						var port2=getport(portCfg.httpts);
 | 
			
		||||
						var port=getport(portCfg.http,"http");
 | 
			
		||||
						var port2=getport(portCfg.httpts,"httpts");
 | 
			
		||||
						if(port!="" || port2!=""){
 | 
			
		||||
							if(port!="" && port2=="")
 | 
			
		||||
								port2=":"+portCfg.httpts[0];
 | 
			
		||||
| 
						 | 
				
			
			@ -917,20 +934,20 @@ else
 | 
			
		|||
						}
 | 
			
		||||
					}
 | 
			
		||||
					else{
 | 
			
		||||
						var port=getport(portCfg.http);
 | 
			
		||||
						url=url.replace("///","//"+ip+":"+port+"/");
 | 
			
		||||
						var port=getport(portCfg.http,"http");
 | 
			
		||||
						url=url.replace("///","//"+ip+port+"/");	
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				else if(url.indexOf("rtmp")==0){
 | 
			
		||||
					var port=getport(portCfg.rtmp);
 | 
			
		||||
					url=url.replace("///","//"+ip+":"+port+"/");
 | 
			
		||||
					var port=getport(portCfg.rtmp,"rtmp");
 | 
			
		||||
					url=url.replace("///","//"+ip+port+"/");	
 | 
			
		||||
				}
 | 
			
		||||
				else if(url.indexOf("rtsp")==0){
 | 
			
		||||
                    var port=getport(portCfg.rtsp);
 | 
			
		||||
                    var port=getport(portCfg.rtsp,"rtsp");
 | 
			
		||||
				    if(url.indexOf("@/") > 0)
 | 
			
		||||
                        url=url.replace("@/","@"+ip+":"+port+"/");
 | 
			
		||||
                        url=url.replace("@/","@"+ip+port+"/");
 | 
			
		||||
				    else
 | 
			
		||||
                        url=url.replace("///","//"+ip+":"+port+"/");
 | 
			
		||||
                        url=url.replace("///","//"+ip+port+"/");
 | 
			
		||||
				}
 | 
			
		||||
				else if(url.indexOf("srt")==0){
 | 
			
		||||
					url=url.replace("//:","//"+ip+":");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,26 +22,25 @@ function upload()
 | 
			
		|||
                    $hardware2 = json_decode(file_get_contents("/link/config/hardware.json"),true);
 | 
			
		||||
                    $fac2 = $hardware2["fac"];
 | 
			
		||||
                    if($fac1 != $fac2)
 | 
			
		||||
                        $up = "-1";
 | 
			
		||||
                        $up = "-1"; // 升级包机型不匹配
 | 
			
		||||
 | 
			
		||||
                    if($up == "0")
 | 
			
		||||
                    {
 | 
			
		||||
                        if(file_exists("/tmp/tmp/allow.json"))
 | 
			
		||||
                        {
 | 
			
		||||
                            $allow = json_decode(file_get_contents("/tmp//tmp/allow.json"),true);
 | 
			
		||||
                            $allow = json_decode(file_get_contents("/tmp/tmp/allow.json"),true);
 | 
			
		||||
                            $allow_version = $allow["allow"];
 | 
			
		||||
                            $sys = json_decode(file_get_contents("/link/config/version.json"),true);
 | 
			
		||||
                            $sys_ary = explode(" ",$sys["sys"]);
 | 
			
		||||
                            $cur_version = $sys_ary[2];
 | 
			
		||||
                            if(intval($allow_version) >= intval($cur_version))
 | 
			
		||||
                                $up = "-2";
 | 
			
		||||
                                $up = "-2";  //升级包与系统版本不匹配
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if($up != "0")
 | 
			
		||||
                    exec("rm /link/update/update.tar");
 | 
			
		||||
 | 
			
		||||
                echo '{"upload":"'.$up.'"}';
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue