mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
fix dream start
This commit is contained in:
parent
1c7a937ef3
commit
85d41c34eb
@ -84,6 +84,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块",
|
||||
switch m.Option("cmd_type") {
|
||||
case "daemon":
|
||||
// 守护进程
|
||||
cmd.Env = append(cmd.Env, fmt.Sprintf("PATH=%s", os.Getenv("PATH")))
|
||||
m.Gos(m, func(m *ice.Message) {
|
||||
if e := cmd.Start(); e != nil {
|
||||
m.Warn(e != nil, "%v start: %s", arg, e)
|
||||
|
@ -807,6 +807,7 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
|
||||
// 启动任务
|
||||
m.Option("cmd_dir", p)
|
||||
m.Option("cmd_type", "daemon")
|
||||
m.Option("cmd_env", "ctx_log", "boot.log")
|
||||
m.Cmd(m.Confv(ice.WEB_DREAM, "meta.cmd"), "self", arg[0])
|
||||
time.Sleep(time.Second * 3)
|
||||
m.Event(ice.DREAM_START, arg...)
|
||||
|
@ -73,7 +73,7 @@ prepare() {
|
||||
}
|
||||
start() {
|
||||
trap HUP hup && while true; do
|
||||
date && ./${ice_bin} \$@ 2>\$ctx_log && echo -e "\n\nrestarting..." || break
|
||||
date && ice.bin \$@ 2>\$ctx_log && echo -e "\n\nrestarting..." || break
|
||||
done
|
||||
}
|
||||
serve() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user