淇敼锛?銆佸皢鏃ュ織鑷畾涔夊啓鍏ユ棩蹇楁枃浠?zhub.log 2銆佸叾浠栦紭鍖?

git-svn-id: svn://47.119.165.148/zhub@164 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
lxy
2023-04-23 12:09:03 +00:00
parent c4709e2529
commit 4911d059a2
7 changed files with 85 additions and 20 deletions

13
main.go
View File

@@ -9,11 +9,14 @@ import (
"zhub/zsub"
)
func main() {
server := true
confPath := "app.conf"
addr := ""
var (
dir, _ = os.Getwd()
confPath = dir + "/app.ini" // 配置文件地址
server = true
addr = "" // 服务地址
)
func main() {
for _, arg := range os.Args[1:] {
if strings.EqualFold(arg, "cli") {
server = false
@@ -35,7 +38,7 @@ func main() {
switch os.Args[2] {
case "timer":
cli.Cmd("reload-timer")
case "shutdown":
case "shutdown", "stop":
cli.Cmd("shutdown")
}
cli.Close()