Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hub update: reload crowdsec if only data files have changed #2912

Merged
merged 3 commits into from
Mar 20, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/cwhub/dataset.go
Expand Up @@ -57,6 +57,11 @@ func downloadFile(url string, destPath string) error {
return err
}

// a check on stdout is used while scripting to know if the hub has been upgraded
// and a configuration reload is required
// TODO: use a better way to communicate this
fmt.Printf("updated %s\n", filepath.Base(destPath))

if err = os.Rename(tmpFileName, destPath); err != nil {
return err
}
Expand Down