mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00: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
@@ -388,7 +388,9 @@ func initCLI() {
|
||||
Use: "start",
|
||||
Short: "Quick start service and configure DNS on interface",
|
||||
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)
|
||||
},
|
||||
}
|
||||
@@ -399,7 +401,9 @@ func initCLI() {
|
||||
Use: "stop",
|
||||
Short: "Quick stop service and remove DNS from interface",
|
||||
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)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user