mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
Merge pull request #31 from Control-D-Inc/release-branch-v1.1.3
Release branch v1.1.3
This commit is contained in:
+9
-3
@@ -70,7 +70,7 @@ func initCLI() {
|
|||||||
rootCmd := &cobra.Command{
|
rootCmd := &cobra.Command{
|
||||||
Use: "ctrld",
|
Use: "ctrld",
|
||||||
Short: strings.TrimLeft(rootShortDesc, "\n"),
|
Short: strings.TrimLeft(rootShortDesc, "\n"),
|
||||||
Version: "1.1.2",
|
Version: "1.1.3",
|
||||||
}
|
}
|
||||||
rootCmd.PersistentFlags().CountVarP(
|
rootCmd.PersistentFlags().CountVarP(
|
||||||
&verbose,
|
&verbose,
|
||||||
@@ -351,7 +351,10 @@ func initCLI() {
|
|||||||
PreRun: checkHasElevatedPrivilege,
|
PreRun: checkHasElevatedPrivilege,
|
||||||
Use: "uninstall",
|
Use: "uninstall",
|
||||||
Short: "Stop and uninstall the ctrld service",
|
Short: "Stop and uninstall the ctrld service",
|
||||||
Args: cobra.NoArgs,
|
Long: `Stop and uninstall the ctrld service.
|
||||||
|
|
||||||
|
NOTE: Uninstalling will set DNS to values provided by DHCP.`,
|
||||||
|
Args: cobra.NoArgs,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
prog := &prog{}
|
prog := &prog{}
|
||||||
s, err := service.New(prog, svcConfig)
|
s, err := service.New(prog, svcConfig)
|
||||||
@@ -365,13 +368,16 @@ func initCLI() {
|
|||||||
}
|
}
|
||||||
initLogging()
|
initLogging()
|
||||||
if doTasks(tasks) {
|
if doTasks(tasks) {
|
||||||
|
if iface == "" {
|
||||||
|
iface = "auto"
|
||||||
|
}
|
||||||
prog.resetDNS()
|
prog.resetDNS()
|
||||||
mainLog.Info().Msg("Service uninstalled")
|
mainLog.Info().Msg("Service uninstalled")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
uninstallCmd.Flags().StringVarP(&iface, "iface", "", "auto", `Reset DNS setting for iface, "auto" means the default interface gateway`)
|
uninstallCmd.Flags().StringVarP(&iface, "iface", "", "", `Reset DNS setting for iface, use "auto" for the default gateway interface`)
|
||||||
|
|
||||||
listIfacesCmd := &cobra.Command{
|
listIfacesCmd := &cobra.Command{
|
||||||
Use: "list",
|
Use: "list",
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ func (uc *UpstreamConfig) SetupBootstrapIP() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if r.Rcode != dns.RcodeSuccess {
|
if r.Rcode != dns.RcodeSuccess {
|
||||||
ProxyLog.Error().Msgf("could not resolve domain return code: %d, upstream", r.Rcode)
|
ProxyLog.Error().Msgf("could not resolve domain %q, return code: %s", uc.Domain, dns.RcodeToString[r.Rcode])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(r.Answer) == 0 {
|
if len(r.Answer) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user