mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
8cac01d75f
commit
b39fc0a342
@ -1088,7 +1088,7 @@ var Index = &ctx.Context{Name: "cli", Help: "管理中心",
|
||||
"cmd_env", "ctx_box", fmt.Sprintf("http://127.0.0.1%s", m.Conf("runtime", "boot.web_port")),
|
||||
"cmd_daemon", "true",
|
||||
}
|
||||
if m.Assert(os.MkdirAll(p, 0666)); m.Conf("runtime", "host.GOOS") == "windows" {
|
||||
if m.Assert(os.MkdirAll(p, 0777)); m.Conf("runtime", "host.GOOS") == "windows" {
|
||||
m.Cmdy("cli.system", path.Join(m.Conf("runtime", "boot.ctx_home"), "bin/node.sh"), "start", args)
|
||||
} else {
|
||||
m.Cmdy("cli.system", m.Conf("runtime", "boot.ctx_bin"), args)
|
||||
|
@ -4,5 +4,5 @@ var version = struct {
|
||||
host string
|
||||
self int
|
||||
}{
|
||||
"2019-08-23 14:51:01", "ZYB-20190522USI", 443,
|
||||
"2019-08-24 17:10:37", "ZYB-20190522USI.centos", 402,
|
||||
}
|
||||
|
@ -34,9 +34,10 @@ func (c *Context) Register(s *Context, x Server, args ...interface{}) *Context {
|
||||
}
|
||||
func (c *Context) Plugin(s *Context, args []string) string {
|
||||
c.Register(s, nil)
|
||||
m := &Message{code: 0, time: time.Now(), source: s, target: s, Meta: map[string][]string{}}
|
||||
kit.DisableLog = true
|
||||
m.Option("log.disable", true)
|
||||
m := Pulse.Spawn(s)
|
||||
// m := &Message{code: 0, time: time.Now(), source: s, target: s, Meta: map[string][]string{}}
|
||||
// kit.DisableLog = true
|
||||
// m.Option("log.disable", true)
|
||||
m.Option("bio.modal", "action")
|
||||
|
||||
if len(args) == 0 {
|
||||
|
@ -118,6 +118,9 @@ func (m *Message) Target() *Context {
|
||||
}
|
||||
|
||||
func (m *Message) Insert(meta string, index int, arg ...interface{}) string {
|
||||
if m == nil {
|
||||
return ""
|
||||
}
|
||||
if m.Meta == nil {
|
||||
m.Meta = make(map[string][]string)
|
||||
}
|
||||
@ -498,8 +501,9 @@ func (m *Message) Cmd(args ...interface{}) *Message {
|
||||
|
||||
} else if strings.Contains(key, ".") {
|
||||
arg := strings.Split(key, ".")
|
||||
msg, key = msg.Sess(arg[0]), arg[1]
|
||||
msg.Option("remote_code", "")
|
||||
if msg, key = msg.Sess(arg[0]), arg[1]; msg != nil {
|
||||
msg.Option("remote_code", "")
|
||||
}
|
||||
}
|
||||
if msg == nil {
|
||||
return msg
|
||||
|
@ -435,6 +435,8 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
|
||||
|
||||
if m.Confs("runtime", "boot.ctx_ups") {
|
||||
m.Cmd("ssh.remote", "dial", m.Conf("runtime", "boot.ctx_ups"))
|
||||
m.Cmd("ssh.remote", "listen", m.Conf("runtime", "boot.ssh_port"))
|
||||
m.Cmd("web.serve", "usr", m.Conf("runtime", "boot.web_port"))
|
||||
|
||||
} else if m.Cmd("ssh.remote", "dial", "dev", "/shadow"); !m.Confs("runtime", "boot.ctx_box") {
|
||||
m.Cmd("ssh.remote", "listen", m.Conf("runtime", "boot.ssh_port"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user