mirror of
https://github.com/tsingui/softcenter-1.git
synced 2024-12-23 10:35:17 +00:00
update dc1svr
This commit is contained in:
parent
a65ced97dd
commit
db1782b147
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
MODULE=dc1svr
|
||||
VERSION=1.0
|
||||
VERSION=1.1
|
||||
TITLE=dc1服务器
|
||||
DESCRIPTION=dc1服务器
|
||||
HOME_URL=Module_dc1svr.asp
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"version":"1.0",
|
||||
"md5":"f68ae16aeda08671d0210772cdc6c218",
|
||||
"version":"1.1",
|
||||
"md5":"a473adbb2ba5e7d36ab8d68050a93ea6",
|
||||
"home_url":"Module_dc1svr.asp",
|
||||
"title":"dc1服务器",
|
||||
"description":"dc1服务器",
|
||||
"build_date":"2019-02-12_19:53:36"
|
||||
"build_date":"2019-02-20_23:06:16"
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
@ -18,7 +18,7 @@ rm -rf /tmp/dc1svr* >/dev/null 2>&1
|
||||
|
||||
chmod a+x /jffs/softcenter/scripts/dc1.sh
|
||||
chmod 0755 /jffs/softcenter/bin/dc1svr
|
||||
dbus set dc1svr_version="1.0"
|
||||
dbus set dc1svr_version="1.1"
|
||||
dbus set softcenter_module_dc1svr_version="1.0"
|
||||
dbus set softcenter_module_dc1svr_description="dc1服务器"
|
||||
dbus set softcenter_module_dc1svr_install=1
|
||||
|
@ -4,7 +4,32 @@ eval `dbus export dc1svr`
|
||||
source /jffs/softcenter/scripts/base.sh
|
||||
CONFIG_FILE=/tmp/etc/dnsmasq.user/dc1.conf
|
||||
|
||||
dc_mon(){
|
||||
echo "#!/bin/sh" > /tmp/dc_mon.sh
|
||||
echo "while [ \"1\" = \"1\" ]" >> /tmp/dc_mon.sh
|
||||
echo "do" >> /tmp/dc_mon.sh
|
||||
echo " sleep 120s" >> /tmp/dc_mon.sh
|
||||
echo " idc=`ps -w|grep dc1svr |grep -v grep |wc -l`" >> /tmp/dc_mon.sh
|
||||
echo " if [ $idc = 0 ] ;then" >> /tmp/dc_mon.sh
|
||||
echo " /jffs/softcenter/scripts/dc1svr.sh" >> /tmp/dc_mon.sh
|
||||
echo " fi" >> /tmp/dc_mon.sh
|
||||
echo "done" >> /tmp/dc_mon.sh
|
||||
/tmp/dc_mon.sh &
|
||||
}
|
||||
|
||||
start_dc1(){
|
||||
killall dc1svr >/dev/null 2>&1
|
||||
if [ -e "/jffs/softcenter/bin/KEY" ]; then
|
||||
[ "$(cat /jffs/softcenter/bin/KEY)" != "$dc1svr_key" ] && echo "$dc1svr_key" > /jffs/softcenter/bin/KEY
|
||||
else
|
||||
if [ "$dc1svr_key" = "0" ]; then
|
||||
key=`nvram get http_passwd`
|
||||
echo "$key" > /jffs/softcenter/bin/KEY
|
||||
dbus set dc1svr_key=$key
|
||||
else
|
||||
echo "$dc1svr_key" > /jffs/softcenter/bin/KEY
|
||||
fi
|
||||
fi
|
||||
cd /jffs/softcenter/bin/
|
||||
/jffs/softcenter/bin/dc1svr &
|
||||
echo "address=/Smartplugconnect.phicomm.com/$(nvram get lan_ipaddr)" > $CONFIG_FILE
|
||||
@ -13,6 +38,7 @@ start_dc1(){
|
||||
if [ ! -e "/jffs/softcenter/init.d/S97dc1svr.sh" ]; then
|
||||
cp -f /jffs/softcenter/scripts/dc1svr.sh /jffs/softcenter/init.d/S97dc1svr.sh
|
||||
fi
|
||||
[ $(ps -w|grep 'dc_mon.sh' |grep -v grep |wc -l) = 0 ] && dc_mon
|
||||
}
|
||||
stop_dc1(){
|
||||
killall dc1svr
|
||||
|
@ -100,6 +100,7 @@
|
||||
<input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get(" preferred_lang "); %>"/>
|
||||
<input type="hidden" name="firmver" value="<% nvram_get(" firmver "); %>"/>
|
||||
<input type="hidden" id="dc1svr_enable" name="dc1svr_enable" value='<% dbus_get_def("dc1svr_enable", "0"); %>' />
|
||||
<input type="hidden" id="dc1svr_key" name="dc1svr_key" value='<% dbus_get_def("dc1svr_key", "0"); %>' />
|
||||
<table class="content" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="17"> </td>
|
||||
@ -151,6 +152,12 @@
|
||||
<a style="margin-left: 318px;" href="https://raw.githubusercontent.com/paldier/softcenter/master/dc1svr/Changelog.txt" target="_blank"><em>[<u> 更新日志 </u>]</em></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="key_tr">
|
||||
<th width="35%">连接密码</th>
|
||||
<td>
|
||||
<textarea style="width:99%;background-color: #475A5F;color:#FFFFFF;" placeholder="# 此处填入连接密码,初始密码为路由器密码" rows="2" style="width:99%; font-family:'Lucida Console'; font-size:12px;background:#475A5F;color:#FFFFFF;" id="dc1svr_key" name="dc1svr_key" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title=""></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="apply_gen">
|
||||
<button id="cmdBtn" class="button_gen" onclick="onSubmitCtrl()">提交</button>
|
||||
@ -160,7 +167,12 @@
|
||||
</div>
|
||||
<div id="NoteBox">
|
||||
<h2>使用说明:</h2>
|
||||
<a style="margin-left: 318px;" href="https://www.right.com.cn/forum/thread-448025-1-1.html" target="_blank"><em>[<u> 点我跳转 </u>]</em></a>
|
||||
<h3>连接密码</h3>
|
||||
<p>默认密码为<font color="red">路由器密码</font></p>
|
||||
<h3>重启插排</h3>
|
||||
<p>启用本插件后<font color="red">必需把排插断电重启一次</font></p>
|
||||
<h3><font color="red">手机APP下载</font></h3>
|
||||
<a href="https://www.right.com.cn/forum/thread-448025-1-1.html" target="_blank">[<u> 点我跳转 </u>]</a>
|
||||
<h2>申明:本工具来自恩山论坛 <a href="https://www.right.com.cn/forum/thread-448025-1-1.html" target="_blank">点我跳转</a></h2>
|
||||
</div>
|
||||
<div style="margin-left:5px;margin-top:10px;margin-bottom:10px">
|
||||
|
@ -1,2 +1,2 @@
|
||||
1.0
|
||||
f68ae16aeda08671d0210772cdc6c218
|
||||
1.1
|
||||
a473adbb2ba5e7d36ab8d68050a93ea6
|
||||
|
@ -101,14 +101,14 @@
|
||||
"version": "1.5"
|
||||
},
|
||||
{
|
||||
"build_date": "2019-02-12_19:53:36",
|
||||
"build_date": "2019-02-20_23:06:16",
|
||||
"description": "dc1服务器",
|
||||
"home_url": "Module_dc1svr.asp",
|
||||
"md5": "f68ae16aeda08671d0210772cdc6c218",
|
||||
"md5": "a473adbb2ba5e7d36ab8d68050a93ea6",
|
||||
"name": "dc1svr",
|
||||
"tar_url": "dc1svr/dc1svr.tar.gz",
|
||||
"title": "dc1服务器",
|
||||
"version": "1.0"
|
||||
"version": "1.1"
|
||||
},
|
||||
{
|
||||
"build_date": "2019-01-16_20:13:34",
|
||||
|
Loading…
Reference in New Issue
Block a user