Home > linux, tools > Using make for system administration

Using make for system administration

December 20th, 2009

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

linux, tools

  1. No comments yet.
  1. No trackbacks yet.