diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-01-19 19:50:02 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-01-19 19:50:02 +0000 |
commit | 8da44c7b9d9a56e2a40e0e193837e03b4835337b (patch) | |
tree | cb511077c4b7b03d3f95d0c79c23a6c7a6bf3145 /debian | |
parent | acf749106422d6ee83599d833df7d60d439a05bb (diff) | |
download | sitesummary-8da44c7b9d9a56e2a40e0e193837e03b4835337b.tar.gz sitesummary-8da44c7b9d9a56e2a40e0e193837e03b4835337b.tar.bz2 sitesummary-8da44c7b9d9a56e2a40e0e193837e03b4835337b.tar.xz |
Make sure to not replace the existing generated nagios config with
a empty file if no entries have been submitted.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 3 | ||||
-rwxr-xr-x | debian/sitesummary.cron.daily | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 9e8b67b..628aca5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ sitesummary (0.0.56~svn61675) UNRELEASED; urgency=low * Continue development. _To_ upload the non-svn version, merge all previous *~svn* versions. + * Make sure to not replace the existing generated nagios config with + a empty file if no entries have been submitted. + -- Petter Reinholdtsen <pere@debian.org> Tue, 19 Jan 2010 19:24:13 +0100 sitesummary (0.0.56~svn61674) lenny; urgency=low diff --git a/debian/sitesummary.cron.daily b/debian/sitesummary.cron.daily index 8ed0f01..ae74ba3 100755 --- a/debian/sitesummary.cron.daily +++ b/debian/sitesummary.cron.daily @@ -85,7 +85,9 @@ generate_nagios_config() { true ) > $NAGIOSDIR/nagios-generated.cfg.new && \ chmod a+r $NAGIOSDIR/nagios-generated.cfg.new - if cmp -s $NAGIOSDIR/nagios-generated.cfg.new $NAGIOSDIR/nagios-generated.cfg + if [ ! -s $NAGIOSDIR/nagios-generated.cfg.new ] || \ + cmp -s $NAGIOSDIR/nagios-generated.cfg.new \ + $NAGIOSDIR/nagios-generated.cfg then rm $NAGIOSDIR/nagios-generated.cfg.new false |