mirror of
https://github.com/0x1d/rcond.git
synced 2025-12-14 18:25:21 +01:00
feat: only update hostname if set
This commit is contained in:
@@ -12,8 +12,11 @@ import (
|
||||
func Configure(appConfig *config.Config) error {
|
||||
log.Print("[INFO] Configure system")
|
||||
// configure hostname
|
||||
if err := network.SetHostname(appConfig.Hostname); err != nil {
|
||||
log.Printf("[ERROR] setting hostname failed: %s", err)
|
||||
if appConfig.Hostname != "" {
|
||||
log.Printf("[INFO] update hostname to %s", appConfig.Hostname)
|
||||
if err := network.SetHostname(appConfig.Hostname); err != nil {
|
||||
log.Printf("[ERROR] setting hostname failed: %s", err)
|
||||
}
|
||||
}
|
||||
// configure network connections
|
||||
for _, connection := range appConfig.Network.Connections {
|
||||
|
||||
Reference in New Issue
Block a user