]> andersk Git - moira.git/blame - gen/nagios-cluster.sh
Build without krb4 if it's unavailable.
[moira.git] / gen / nagios-cluster.sh
CommitLineData
775cb4ca 1#!/bin/sh
2# $Id$
3
4# The following exit codes are defined and MUST BE CONSISTENT with
5# error codes the library uses:
6MR_MKCRED=47836474
7
8file=/var/nagios-cluster/etc/moira-cluster.cfg
9newfile=$file.new
10initscript=/etc/init.d/nagios-cluster
11
12if [ -d /var/athena ] && [ -w /var/athena ]; then
13 exec >/var/athena/moira_update.log 2>&1
14else
15 exec >/tmp/moira_update.log 2>&1
16fi
17
18chmod 644 $file.new
19diff -q $file $newfile
20status=$?
21if [ $status -eq 0 ]; then
22 echo "No changes"
23 exit 0
24elif [ $status -eq 1 ]; then
25 mv $newfile $file
26 $initscript restart
27 if [ $? -eq 0 ]; then
28 exit 0
29 else
30 exit $MR_MKCRED
31 fi
32else
33 exit $MR_MKCRED
34fi
This page took 0.176144 seconds and 5 git commands to generate.