mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
db4ecebd45
commit
deca0a8e8d
@ -72,8 +72,8 @@ const USER = "user"
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
USER: {Name: "user username auto create", Help: "用户", Actions: ice.MergeActions(ice.Actions{
|
||||
mdb.CREATE: {Name: "create username password userrole=void,tech", Help: "创建", Hand: func(m *ice.Message, arg ...string) {
|
||||
_user_create(m, m.Option(USERNAME), m.Option(PASSWORD), m.OptionSimple(USERROLE)...)
|
||||
mdb.CREATE: {Name: "create username password userrole=void,tech usernick", Help: "创建", Hand: func(m *ice.Message, arg ...string) {
|
||||
_user_create(m, m.Option(USERNAME), m.Option(PASSWORD), m.OptionSimple(USERROLE, USERNICK)...)
|
||||
}},
|
||||
LOGIN: {Name: "login username password", Help: "登录", Hand: func(m *ice.Message, arg ...string) {
|
||||
_user_login(m, m.Option(USERNAME), m.Option(PASSWORD))
|
||||
@ -87,7 +87,7 @@ func UserRoot(m *ice.Message, arg ...string) *ice.Message { // password username
|
||||
userrole := m.Option(ice.MSG_USERROLE, kit.Select(ROOT, arg, 2))
|
||||
m.Option(ice.MSG_USERNICK, UserNick(m, username))
|
||||
if len(arg) > 0 {
|
||||
m.Cmd(USER, mdb.CREATE, username, kit.Select("", arg, 0), userrole)
|
||||
m.Cmd(USER, mdb.CREATE, username, kit.Select("", arg, 0), userrole, kit.Select("", arg, 3))
|
||||
ice.Info.UserName = username
|
||||
}
|
||||
return m
|
||||
|
@ -93,7 +93,7 @@ func _serve_start(m *ice.Message) {
|
||||
if m.Option("staffname") != "" {
|
||||
m.Config("staffname", m.Option(aaa.USERNAME, m.Option("staffname")))
|
||||
}
|
||||
aaa.UserRoot(m, m.Option(aaa.PASSWORD), m.Option(aaa.USERNAME), m.Option(aaa.USERROLE))
|
||||
aaa.UserRoot(m, m.Option(aaa.PASSWORD), m.Option(aaa.USERNAME), m.Option(aaa.USERROLE), m.Option(aaa.USERNICK))
|
||||
|
||||
m.Target().Start(m, m.OptionSimple(tcp.HOST, tcp.PORT)...)
|
||||
m.Go(func() { m.Cmd(BROAD, SERVE) })
|
||||
@ -364,7 +364,7 @@ func init() {
|
||||
ctx.DisplayStorySpide(m, lex.PREFIX, m.ActionKey(), nfs.ROOT, MergeLink(m, ice.PS))
|
||||
}
|
||||
}},
|
||||
cli.START: {Name: "start dev proto=http host port=9020 nodename password username userrole staffname", Help: "启动", Hand: func(m *ice.Message, arg ...string) {
|
||||
cli.START: {Name: "start dev proto=http host port=9020 nodename password username userrole usernick staffname", Help: "启动", Hand: func(m *ice.Message, arg ...string) {
|
||||
_serve_start(m)
|
||||
}},
|
||||
}, mdb.HashAction())},
|
||||
|
@ -132,8 +132,8 @@ func init() {
|
||||
|
||||
var _contexts = kit.Dict(
|
||||
ice.MISC, `# 下载命令 curl 或 wget
|
||||
export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL $ctx_dev; source $ctx_temp app username {{.Option "user.name"}}
|
||||
export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); wget -O $ctx_temp -q $ctx_dev; source $ctx_temp app username {{.Option "user.name"}}
|
||||
export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL $ctx_dev; source $ctx_temp app username {{.Option "user.name"}} usernick {{.Option "user.nick"}}
|
||||
export ctx_dev={{.Option "httphost"}}{{.Option "ctx_env"}}; ctx_temp=$(mktemp); wget -O $ctx_temp -q $ctx_dev; source $ctx_temp app username {{.Option "user.name"}} usernick {{.Option "user.nick"}}
|
||||
`,
|
||||
ice.CORE, `# 下载工具 curl 或 wget
|
||||
ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL {{.Cmdx "spide" "shy" "client.url"}}; source $ctx_temp binary
|
||||
|
Loading…
x
Reference in New Issue
Block a user