Revision 23740,
723 bytes
checked in by broder, 16 years ago
(diff) |
In moira:
* New CVS snapshot (Trac: #195)
* Drop patches that have been incorporated upstream.
* Update to build without krb4 on systems that no longer have it.
This doesn't build yet on squeeze, which lacks a krb4 library, but I'm
committing now before I start hacking away at a patch to fix that.
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # $Id: nagios-cluster.sh,v 1.1 2009-02-18 00:55:01 jweiss Exp $ |
---|
3 | |
---|
4 | # The following exit codes are defined and MUST BE CONSISTENT with |
---|
5 | # error codes the library uses: |
---|
6 | MR_MKCRED=47836474 |
---|
7 | |
---|
8 | file=/var/nagios-cluster/etc/moira-cluster.cfg |
---|
9 | newfile=$file.new |
---|
10 | initscript=/etc/init.d/nagios-cluster |
---|
11 | |
---|
12 | if [ -d /var/athena ] && [ -w /var/athena ]; then |
---|
13 | exec >/var/athena/moira_update.log 2>&1 |
---|
14 | else |
---|
15 | exec >/tmp/moira_update.log 2>&1 |
---|
16 | fi |
---|
17 | |
---|
18 | chmod 644 $file.new |
---|
19 | diff -q $file $newfile |
---|
20 | status=$? |
---|
21 | if [ $status -eq 0 ]; then |
---|
22 | echo "No changes" |
---|
23 | exit 0 |
---|
24 | elif [ $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 |
---|
32 | else |
---|
33 | exit $MR_MKCRED |
---|
34 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.