blob: 8df2aadade05192e3644fd1715e51964bdb991b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/sh
yoshi = dofile'yoshi.lua'
local function isHome()
local ok, reason, code = os.execute("nc -z -w1 192.168.50.2 2222")
return code == 0
end
yoshi.hosts["ganymede"] = function()
if isHome() then
return yoshi.ssh{
HostName = "192.168.50.2",
Port = 2222,
LocalForward = 8010
}
else
return yoshi.ssh{
HostName = "williamsfam.us.com",
LocalForward = 8010,
DynamicForward = 9090
}
end
end
yoshi.hosts["io"] = function()
return yoshi.ssh{
HostName = "192.168.50.3",
User = "admin",
ProxyJump = isHome() or "collin@ganymede",
}
end
yoshi.run(arg, {dry_run = true})
|