Skip to content

Commit

Permalink
fix: remove signal skip on discoverd
Browse files Browse the repository at this point in the history
  • Loading branch information
smitropoulos-arista committed Nov 13, 2024
1 parent 7dbad35 commit 9d821ee
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions services/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,18 +576,9 @@ func syncAndSave(jsonObject map[string]interface{}, filename string, force bool,

logger.Debug("Sighup: %v\n", ShouldRunSighup)
logger.Debug("Executables: %v\n", SighupExecutables)
//Check if network discovery is enabled
isDiscoveryEnabled, err := getSettingsFromJSON(jsonObject, []string{"discovery", "enabled"})
if err != nil {
logger.Warn("Failed to get discovery status from settings: %v\n", err.Error())
return output, err
}

if ShouldRunSighup {
for _, executable := range SighupExecutables {
if executable == "discoverd" && !(isDiscoveryEnabled.(bool)) {
logger.Info("Discovery is not enabled hence skipping sighup\n")
continue
}
_, err := os.Stat("/usr/bin/updateSysdbSignal")
if err == nil || !os.IsNotExist(err) {
if err := exec.Command("/usr/bin/updateSysdbSignal", "--sighup").Run(); err != nil {
Expand Down

0 comments on commit 9d821ee

Please sign in to comment.