forked from x/icebergs
opt some
This commit is contained in:
parent
cd2c102369
commit
c42444ccf5
@ -88,7 +88,7 @@ func _dream_show(m *ice.Message, name string) {
|
||||
m.Optionv(cli.CMD_OUTPUT, path.Join(p, m.Config(kit.Keys(cli.ENV, cli.CTX_LOG))))
|
||||
|
||||
// 启动任务
|
||||
m.Cmd(cli.DAEMON, "ice.bin", SPACE, tcp.DIAL, ice.DEV, ice.OPS, mdb.NAME, name, m.OptionSimple(RIVER))
|
||||
m.Cmd(cli.DAEMON, kit.Path(os.Args[0]), SPACE, tcp.DIAL, ice.DEV, ice.OPS, mdb.NAME, name, m.OptionSimple(RIVER))
|
||||
defer m.Event(DREAM_CREATE, kit.SimpleKV("", m.Option(mdb.TYPE), name)...)
|
||||
m.Sleep3s()
|
||||
}
|
||||
|
@ -72,6 +72,8 @@ func init() {
|
||||
m.Log_EXPORT(nfs.SOURCE, main, nfs.TARGET, file)
|
||||
m.Cmdy(nfs.DIR, file, "time,path,size,link,action")
|
||||
name := path.Base(m.Append(nfs.PATH))
|
||||
m.EchoScript(kit.Format("# 下载启动\nwget %s && chmod u+x %s\n./%s forever serve dev %s\ntail -f var/log/bench.log",
|
||||
m.MergeURL2(kit.Format("/publish/%s", name)), name, name, m.MergeURL2(ice.PS)))
|
||||
m.EchoScript(kit.Format("# 下载启动\ncurl -fOL %s && chmod u+x %s\n./%s forever serve dev %s\ntail -f var/log/bench.log",
|
||||
m.MergeURL2(kit.Format("/publish/%s", name)), name, name, m.MergeURL2(ice.PS)))
|
||||
m.Cmd(PUBLISH, mdb.CREATE, ice.BIN_ICE_SH)
|
||||
|
@ -184,8 +184,15 @@ func init() {
|
||||
switch {
|
||||
case strings.Contains(osid, cli.ALPINE):
|
||||
m.Cmd(cli.SYSTEM, "apk", "add", "git", "go")
|
||||
m.Cmd(cli.SYSTEM, "go", "get", "shylinux.com/x/ice")
|
||||
case strings.Contains(osid, cli.CENTOS):
|
||||
m.Cmdy(INSTALL, web.DOWNLOAD, "https://golang.google.cn/dl/go1.15.5.linux-amd64.tar.gz", ice.USR_LOCAL)
|
||||
|
||||
case strings.Contains(osid, cli.UBUNTU):
|
||||
m.Cmdy(INSTALL, web.DOWNLOAD, "https://golang.google.cn/dl/go1.15.5.linux-amd64.tar.gz", ice.USR_LOCAL)
|
||||
default:
|
||||
m.Toast("please install git and go")
|
||||
return
|
||||
}
|
||||
m.ToastSuccess()
|
||||
}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user