update-02.05
This commit is contained in:
parent
6af65ca521
commit
4acabb9ed5
|
@ -715,6 +715,14 @@ elseif action == "console" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local ttyd_ssl = uci.get("ttyd", "@ttyd[0]", "ssl")
|
||||||
|
local ttyd_ssl_key = uci.get("ttyd", "@ttyd[0]", "ssl_key")
|
||||||
|
local ttyd_ssl_cert = uci.get("ttyd", "@ttyd[0]", "ssl_cert")
|
||||||
|
|
||||||
|
if ttyd_ssl=="1" and ttyd_ssl_cert and ttyd_ssl_key then
|
||||||
|
cmd_ttyd=string.format('%s -S -C %s -K %s',cmd_ttyd,ttyd_ssl_cert,ttyd_ssl_key)
|
||||||
|
end
|
||||||
|
|
||||||
local pid = luci.util.trim(luci.util.exec("netstat -lnpt | grep :7682 | grep ttyd | tr -s ' ' | cut -d ' ' -f7 | cut -d'/' -f1"))
|
local pid = luci.util.trim(luci.util.exec("netstat -lnpt | grep :7682 | grep ttyd | tr -s ' ' | cut -d ' ' -f7 | cut -d'/' -f1"))
|
||||||
if pid and pid ~= "" then
|
if pid and pid ~= "" then
|
||||||
luci.util.exec("kill -9 " .. pid)
|
luci.util.exec("kill -9 " .. pid)
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
<iframe id="terminal" style="width: 100%; min-height: 500px; border: none; border-radius: 3px;"></iframe>
|
<iframe id="terminal" style="width: 100%; min-height: 500px; border: none; border-radius: 3px;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.getElementById("terminal").src = "http://" + window.location.hostname + ":7682";
|
document.getElementById("terminal").src = window.location.protocol + "//" + window.location.hostname + ":7682";
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue