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

add reload option for systemd service #340

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

HaveSec
Copy link
Contributor

@HaveSec HaveSec commented Jul 24, 2024

send HUP to goflow2 during service reload

@marioschaefer
Copy link
Contributor

+1

@lspgn
Copy link
Member

lspgn commented Jul 27, 2024

Hello,
Thank you for your contribution.
Can you add a bit more details on your use-case? Should be ok otherwise.

FYI: There is no hot-reload of the configuration, it's just for the logs rotation.

@HaveSec
Copy link
Contributor Author

HaveSec commented Jul 29, 2024

Hello,

I would like to use logrotate to manage the rotation of transport.files logs. To streamline this process, adding the reload option to the systemd service would be beneficial. Below are the steps to configure this:

File: /etc/logrotate.d/goflow2

/var/log/sflow/goflow2/goflow2.log
{
        rotate 60
        daily
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
                systemctl reload goflow2
        endscript
}

Thank you!

@lspgn lspgn merged commit 95cb0e4 into netsampler:main Jul 31, 2024
1 check passed
lspgn pushed a commit that referenced this pull request Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants