1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-31 15:43:00 +00:00

network group wip + virtual dirs + better trust

This commit is contained in:
kepler155c@gmail.com
2019-04-08 09:30:47 -04:00
parent 9413785248
commit 70733ab4f2
8 changed files with 92 additions and 31 deletions

View File

@@ -6,6 +6,7 @@ local Util = require('util')
local colors = _G.colors
local multishell = _ENV.multishell
local os = _G.os
local shell = _ENV.shell
local term = _G.term
local remoteId
@@ -26,7 +27,15 @@ if multishell then
end
local function connect()
local socket, msg = Socket.connect(remoteId, 5900)
local socket, msg, reason = Socket.connect(remoteId, 5900)
if reason == 'NOTRUST' then
local s, m = shell.run('trust ' .. remoteId)
if not s then
return s, m
end
socket, msg = Socket.connect(remoteId, 5900)
end
if not socket then
return false, msg