mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
4d1f2256fc
commit
5b0a86f019
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"syscall"
|
||||
|
||||
ice "shylinux.com/x/icebergs"
|
||||
@ -49,6 +50,9 @@ func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
SIGNAL: {Name: "signal signal auto listen", Help: "信号量", Actions: ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if runtime.GOOS == "windows" {
|
||||
return
|
||||
}
|
||||
_signal_listen(m, 2, mdb.NAME, "重启", ice.CMD, "exit 1")
|
||||
_signal_listen(m, 3, mdb.NAME, "退出", ice.CMD, "exit 0")
|
||||
if f, p, e := logs.CreateFile(ice.Info.PidPath); e == nil {
|
||||
|
@ -215,11 +215,13 @@ func init() {
|
||||
PULL: {Help: "下载", Hand: func(m *ice.Message, arg ...string) {
|
||||
_status_each(m, "", cli.SYSTEM, GIT, PULL)
|
||||
_status_each(m, "", cli.SYSTEM, GIT, PULL, "--tags")
|
||||
m.Sleep("3s")
|
||||
}},
|
||||
PUSH: {Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Option(REPOS) == "" {
|
||||
_status_each(m, "", cli.SYSTEM, GIT, PUSH)
|
||||
_status_each(m, "", cli.SYSTEM, GIT, PUSH, "--tags")
|
||||
m.Sleep("3s")
|
||||
return
|
||||
}
|
||||
m.Option(cli.CMD_DIR, _repos_path(m.Option(REPOS)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user