mirror of
https://shylinux.com/x/icebergs
synced 2025-05-01 03:09:21 +08:00
add boot
This commit is contained in:
parent
2939426a73
commit
35007a3e6e
@ -132,6 +132,7 @@ const (
|
|||||||
CTX_COM = "ctx_com"
|
CTX_COM = "ctx_com"
|
||||||
CTX_OPS = "ctx_ops"
|
CTX_OPS = "ctx_ops"
|
||||||
CTX_DEMO = "ctx_demo"
|
CTX_DEMO = "ctx_demo"
|
||||||
|
CTX_ROOT = "ctx_root"
|
||||||
CTX_MAIL = "ctx_mail"
|
CTX_MAIL = "ctx_mail"
|
||||||
|
|
||||||
CTX_PID = "ctx_pid"
|
CTX_PID = "ctx_pid"
|
||||||
@ -140,7 +141,7 @@ const (
|
|||||||
CTX_ENV = "ctx_env"
|
CTX_ENV = "ctx_env"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ENV_LIST = []string{TZ, LANG, TERM, SHELL, CTX_SHY, CTX_DEV, CTX_HUB, CTX_COM, CTX_OPS, CTX_DEMO, CTX_MAIL, CTX_PID}
|
var ENV_LIST = []string{TZ, LANG, TERM, SHELL, CTX_SHY, CTX_DEV, CTX_HUB, CTX_COM, CTX_OPS, CTX_ROOT, CTX_DEMO, CTX_MAIL, CTX_PID}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
HOSTNAME = "hostname"
|
HOSTNAME = "hostname"
|
||||||
|
@ -75,7 +75,7 @@ func _dream_start(m *ice.Message, name string) {
|
|||||||
defer m.Sleep3s()
|
defer m.Sleep3s()
|
||||||
m.Options(cli.CMD_DIR, kit.Path(p), cli.CMD_ENV, kit.EnvList(kit.Simple(
|
m.Options(cli.CMD_DIR, kit.Path(p), cli.CMD_ENV, kit.EnvList(kit.Simple(
|
||||||
cli.CTX_OPS, Domain(tcp.LOCALHOST, m.Cmdv(SERVE, tcp.PORT)), cli.CTX_LOG, ice.VAR_LOG_BOOT_LOG, cli.CTX_PID, ice.VAR_LOG_ICE_PID,
|
cli.CTX_OPS, Domain(tcp.LOCALHOST, m.Cmdv(SERVE, tcp.PORT)), cli.CTX_LOG, ice.VAR_LOG_BOOT_LOG, cli.CTX_PID, ice.VAR_LOG_ICE_PID,
|
||||||
cli.PATH, cli.BinPath(p, ""), cli.USER, ice.Info.Username,
|
cli.CTX_ROOT, kit.Path(""), cli.PATH, cli.BinPath(p, ""), cli.USER, ice.Info.Username,
|
||||||
)...), cli.CMD_OUTPUT, path.Join(p, ice.VAR_LOG_BOOT_LOG), mdb.CACHE_CLEAR_ONEXIT, ice.TRUE)
|
)...), cli.CMD_OUTPUT, path.Join(p, ice.VAR_LOG_BOOT_LOG), mdb.CACHE_CLEAR_ONEXIT, ice.TRUE)
|
||||||
defer m.Options(cli.CMD_DIR, "", cli.CMD_ENV, "", cli.CMD_OUTPUT, "")
|
defer m.Options(cli.CMD_DIR, "", cli.CMD_ENV, "", cli.CMD_OUTPUT, "")
|
||||||
gdb.Event(m, DREAM_CREATE, m.OptionSimple(mdb.NAME, mdb.TYPE))
|
gdb.Event(m, DREAM_CREATE, m.OptionSimple(mdb.NAME, mdb.TYPE))
|
||||||
|
2
info.go
2
info.go
@ -56,6 +56,7 @@ var Info = struct {
|
|||||||
Hostname string
|
Hostname string
|
||||||
Pathname string
|
Pathname string
|
||||||
PidPath string
|
PidPath string
|
||||||
|
CtxRoot string
|
||||||
Traceid string
|
Traceid string
|
||||||
Colors bool
|
Colors bool
|
||||||
Pwd string
|
Pwd string
|
||||||
@ -105,6 +106,7 @@ var Info = struct {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Info.Pwd = kit.Path("")
|
Info.Pwd = kit.Path("")
|
||||||
|
Info.CtxRoot = kit.Env("ctx_root")
|
||||||
Info.Traceid = os.Getenv(LOG_TRACE)
|
Info.Traceid = os.Getenv(LOG_TRACE)
|
||||||
}
|
}
|
||||||
func AddMergeAction(h ...Any) {
|
func AddMergeAction(h ...Any) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user