Files
umbrix-libcore/cmd/cmd_admin_service.go

25 lines
457 B
Go
Raw Normal View History

2024-01-29 21:55:01 +01:00
package main
import (
2024-02-02 13:47:41 +01:00
"fmt"
2024-01-29 21:55:01 +01:00
"github.com/hiddify/libcore/admin_service"
"github.com/spf13/cobra"
)
var commandService = &cobra.Command{
Use: "admin-service",
Short: "Sign box service start/stop/install/uninstall",
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
2024-02-02 13:47:41 +01:00
arg := ""
if len(args) > 1 {
arg = args[1]
2024-01-29 21:55:01 +01:00
}
2024-02-02 13:47:41 +01:00
code, out := admin_service.StartService(arg)
fmt.Printf("exitCode:%d msg=%s", code, out)
2024-01-29 21:55:01 +01:00
},
}