Whats the best way to verify temporary configs?
Posted: Fri Jun 27, 2014 11:59 am
Hey guys,
I have a process which drops newly generated configs on a nagios box, but I want to verify them before copying them over and restarting. I figured copying them to /tmp/configs/$date/nagios.cfg then running nagios -v /tmp/configs/$date/nagios.cfg would do the trick.. but that doesn't work - it just verifies the current running configs (Due to paths inside nagios.cfg the same as the currently running install). Is there a way to run a self contained syntax verify on a set of configs?
Thanks!
I have a process which drops newly generated configs on a nagios box, but I want to verify them before copying them over and restarting. I figured copying them to /tmp/configs/$date/nagios.cfg then running nagios -v /tmp/configs/$date/nagios.cfg would do the trick.. but that doesn't work - it just verifies the current running configs (Due to paths inside nagios.cfg the same as the currently running install). Is there a way to run a self contained syntax verify on a set of configs?
Thanks!