Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:hypriot/device-init
Browse files Browse the repository at this point in the history
* 'master' of github.com:hypriot/device-init:
  restart rsyslog when setting hostname
  • Loading branch information
Govinda Fichtner authored and Govinda Fichtner committed Apr 19, 2016
2 parents 90afb9b + b943137 commit 084f592
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/hostname_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ func set_hostname(args ...string) {
fmt.Println("Unable to restart avahi-daemon: ", err)
}

err = exec.Command("/bin/systemctl", "restart", "rsyslog.service").Run()
if err != nil {
fmt.Println("Unable to restart rsyslog: ", err)
}

fmt.Printf("Set hostname: %s\n", hostname)
}
}
Expand Down

0 comments on commit 084f592

Please sign in to comment.