forked from x/icebergs
add ice.port
This commit is contained in:
parent
df1fbade2f
commit
71f8117415
@ -8,6 +8,7 @@ import (
|
|||||||
"shylinux.com/x/icebergs/base/aaa"
|
"shylinux.com/x/icebergs/base/aaa"
|
||||||
"shylinux.com/x/icebergs/base/ctx"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
|
"shylinux.com/x/icebergs/base/nfs"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -35,6 +36,7 @@ func init() {
|
|||||||
RenderMain(m)
|
RenderMain(m)
|
||||||
} else {
|
} else {
|
||||||
kit.If(len(arg) == 0, func() { arg = append(arg, SPACE, DOMAIN) })
|
kit.If(len(arg) == 0, func() { arg = append(arg, SPACE, DOMAIN) })
|
||||||
|
m.Cmd(SPIDE, mdb.CREATE, ice.OPS, kit.Format("http://localhost:%s", kit.Select("9020", m.Cmdx(nfs.CAT, ice.VAR_LOG_ICE_PORT))))
|
||||||
m.Cmdy(SPIDE, ice.OPS, SPIDE_RAW, http.MethodPost, C(path.Join(arg...)), "pwd", kit.Path(""))
|
m.Cmdy(SPIDE, ice.OPS, SPIDE_RAW, http.MethodPost, C(path.Join(arg...)), "pwd", kit.Path(""))
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
@ -33,6 +33,7 @@ func _serve_start(m *ice.Message) {
|
|||||||
})
|
})
|
||||||
cli.NodeInfo(m, kit.Select(ice.Info.Hostname, m.Option(tcp.NODENAME)), SERVER)
|
cli.NodeInfo(m, kit.Select(ice.Info.Hostname, m.Option(tcp.NODENAME)), SERVER)
|
||||||
m.Start("", m.OptionSimple(tcp.HOST, tcp.PORT)...)
|
m.Start("", m.OptionSimple(tcp.HOST, tcp.PORT)...)
|
||||||
|
m.Cmd(nfs.SAVE, ice.VAR_LOG_ICE_PORT, m.Option(tcp.PORT))
|
||||||
kit.For(kit.Split(m.Option(ice.DEV)), func(dev string) {
|
kit.For(kit.Split(m.Option(ice.DEV)), func(dev string) {
|
||||||
m.Sleep30ms(SPACE, tcp.DIAL, ice.DEV, dev, mdb.NAME, ice.Info.NodeName, m.OptionSimple(TOKEN))
|
m.Sleep30ms(SPACE, tcp.DIAL, ice.DEV, dev, mdb.NAME, ice.Info.NodeName, m.OptionSimple(TOKEN))
|
||||||
})
|
})
|
||||||
|
1
conf.go
1
conf.go
@ -141,6 +141,7 @@ const ( // DIR
|
|||||||
USR_LOCAL_DAEMON = "usr/local/daemon/"
|
USR_LOCAL_DAEMON = "usr/local/daemon/"
|
||||||
VAR_DATA_IMPORTANT = "var/data/.important"
|
VAR_DATA_IMPORTANT = "var/data/.important"
|
||||||
VAR_LOG_BOOT_LOG = "var/log/boot.log"
|
VAR_LOG_BOOT_LOG = "var/log/boot.log"
|
||||||
|
VAR_LOG_ICE_PORT = "var/log/ice.port"
|
||||||
VAR_LOG_ICE_PID = "var/log/ice.pid"
|
VAR_LOG_ICE_PID = "var/log/ice.pid"
|
||||||
|
|
||||||
VAR_LOG = "var/log/"
|
VAR_LOG = "var/log/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user