Skip to content

Commit

Permalink
s/-networkd/-resolved/g
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Hollensbe <[email protected]>
  • Loading branch information
Erik Hollensbe committed Jul 26, 2021
1 parent a663ce4 commit 4785be1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *serviceAPIClient) Do(req *http.Request) (*http.Response, error) {
}

func main() {
autoRestartFlag := flag.Bool("auto-restart", true, "Automatically restart systemd-networkd when things change")
autoRestartFlag := flag.Bool("auto-restart", true, "Automatically restart systemd-resolved when things change")
reconcileFlag := flag.Bool("reconcile", true, "Automatically remove left networks from systemd-networkd configuration")
flag.Parse()

Expand Down Expand Up @@ -242,8 +242,8 @@ func main() {
if changed && *autoRestartFlag {
fmt.Println("Files changed; reloading systemd-networkd...")

if err := exec.Command("systemctl", "restart", "systemd-networkd").Run(); err != nil {
errExit(fmt.Errorf("While reloading systemd: %v", err))
if err := exec.Command("systemctl", "restart", "systemd-resolved").Run(); err != nil {
errExit(fmt.Errorf("While restarting systemd-resolved: %v", err))
}
}
}

0 comments on commit 4785be1

Please sign in to comment.