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

Adding configuration for start and reload #364

Open
BaldMansMojo opened this issue May 31, 2021 · 2 comments
Open

Adding configuration for start and reload #364

BaldMansMojo opened this issue May 31, 2021 · 2 comments

Comments

@BaldMansMojo
Copy link

BaldMansMojo commented May 31, 2021

Hi,

I added the following to my init script. Should be done for systemd too:

# Added configuration check. Without the check Naemon crashes and you 
# have to examin the logfile - Martin Fuerstenau

$exec -v $config > /dev/null 2>&1
retval=$?

if [ $retval -ne 0 ]
   then
   failure
   echo
   echo "CONFIG ERROR! Reload/restart aborted. Check your Naemon configuration."
   return $retval
fi

When unfortunately doing a reload without checking configuration first Naemon stops. Then you have to look into the logfile..... . this takes time. If this happens when running Naemon in a cluster (I do it with CentOS) the cluster starts restarting Naemon or switching to another node.

Adding this to reload means that the daemon still runs, nothing will happen and you can fix your configuration.

Martin

@ccztux
Copy link
Contributor

ccztux commented Oct 29, 2021

Same issue for the systemd unit file.

I will submit a pull request to fix this.

@BaldMansMojo
Copy link
Author

Great.

ccztux pushed a commit to ccztux/naemon-core that referenced this issue Nov 2, 2021
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

No branches or pull requests

2 participants