dump指令
This commit is contained in:
parent
61744c7886
commit
c33b8f0729
|
@ -80,3 +80,7 @@ func onStop() {
|
||||||
func onCommand(command string) {
|
func onCommand(command string) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func onConfig() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package src
|
package src
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
@ -31,6 +32,8 @@ func Start() {
|
||||||
daemonStop()
|
daemonStop()
|
||||||
case "status":
|
case "status":
|
||||||
daemonStatus()
|
daemonStatus()
|
||||||
|
case "dump":
|
||||||
|
dumpConfig()
|
||||||
case "-s":
|
case "-s":
|
||||||
daemonCommand()
|
daemonCommand()
|
||||||
default:
|
default:
|
||||||
|
@ -154,6 +157,15 @@ func daemonStatus() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func dumpConfig() {
|
||||||
|
//config, err := json.Marshal(GetAppConfig())
|
||||||
|
config, err := json.MarshalIndent(GetAppConfig(), "", " ")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to marshal config: %v", err)
|
||||||
|
}
|
||||||
|
log.Println(string(config))
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
守护进程接收名称
|
守护进程接收名称
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user