mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/ctrld: only add "--iface" if not changed for start/stop aliases
This commit is contained in:
committed by
Cuong Manh Le
parent
a9fabd1b79
commit
dc7d77b22e
+6
-2
@@ -388,7 +388,9 @@ func initCLI() {
|
|||||||
Use: "start",
|
Use: "start",
|
||||||
Short: "Quick start service and configure DNS on interface",
|
Short: "Quick start service and configure DNS on interface",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
os.Args = append(os.Args, "--iface="+ifaceStartStop)
|
if !cmd.Flags().Changed("iface") {
|
||||||
|
os.Args = append(os.Args, "--iface="+ifaceStartStop)
|
||||||
|
}
|
||||||
startCmd.Run(cmd, args)
|
startCmd.Run(cmd, args)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -399,7 +401,9 @@ func initCLI() {
|
|||||||
Use: "stop",
|
Use: "stop",
|
||||||
Short: "Quick stop service and remove DNS from interface",
|
Short: "Quick stop service and remove DNS from interface",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
os.Args = append(os.Args, "--iface="+ifaceStartStop)
|
if !cmd.Flags().Changed("iface") {
|
||||||
|
os.Args = append(os.Args, "--iface="+ifaceStartStop)
|
||||||
|
}
|
||||||
stopCmd.Run(cmd, args)
|
stopCmd.Run(cmd, args)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user