mirror of
https://github.com/EnumeratedDev/enit.git
synced 2026-09-16 02:26:11 +00:00
Move dialSocket function call into 'sv' subcommand
This commit is contained in:
+4
-4
@@ -29,10 +29,6 @@ func main() {
|
|||||||
printJson := flag.Bool("json", false, "print output in json format")
|
printJson := flag.Bool("json", false, "print output in json format")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
// Dial esvm socket
|
|
||||||
dialSocket()
|
|
||||||
defer conn.Close()
|
|
||||||
|
|
||||||
if flag.NArg() < 1 {
|
if flag.NArg() < 1 {
|
||||||
printUsage()
|
printUsage()
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
@@ -57,6 +53,10 @@ func main() {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
} else if flag.Args()[0] == "service" || flag.Args()[0] == "sv" {
|
} else if flag.Args()[0] == "service" || flag.Args()[0] == "sv" {
|
||||||
|
// Dial esvm socket
|
||||||
|
dialSocket()
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
if len(flag.Args()) <= 1 {
|
if len(flag.Args()) <= 1 {
|
||||||
fmt.Println("Usage: ectl service <reload/start/stop/enable/disable/status/list> [service]")
|
fmt.Println("Usage: ectl service <reload/start/stop/enable/disable/status/list> [service]")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user