Using make for system administration
Many applications like Apache or Nagios have a special command line swich or a dedicated tool to check if
the configuration file(s) are correct without restarting the server. This is very nice. When you’ve made a mistake you can fix it with a minimal downtime.
Make makes it quite easy to combine the check and the restart of the application. Here is an example Makefile for my Nagios setup. After changing the configuration I just type make and the rest is done automatically. I’m also using similar Makefiles for apache2, bind, postfix, …
all:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/etc/init.d/nagios restart