Skip to content

Log runtime configuration on SIGUSR2 #36

@realsimix

Description

@realsimix

Hi Maxim,

I'm coming back to you with an idea to improve configuration management.

While we can use spampd --show config to show the current config, it shows only the config options defined in config files.

Would it be possible to add a signal handler so that one can send a SIGUSR2 to the master spampd process to it will send the current runtime config to the log? (The idea is shamelessly taken from OpenVPN which logs statistics on SIGUSR2)

That way it would be possible to see what spampd really runs, even with a combination of command options and config files.

Unfortunately I don't know perl enough to do this myself. I saw that Net::Server handles HUP and provides a hook for it but is it possible to handle USR2 with Net::Server?

Thanks,
Simon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions