summaryrefslogtreecommitdiffstats
path: root/libexec/post-receive.d/01-mail-notify
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /libexec/post-receive.d/01-mail-notify
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'libexec/post-receive.d/01-mail-notify')
-rwxr-xr-xlibexec/post-receive.d/01-mail-notify39
1 files changed, 39 insertions, 0 deletions
diff --git a/libexec/post-receive.d/01-mail-notify b/libexec/post-receive.d/01-mail-notify
new file mode 100755
index 0000000..d5e8b84
--- /dev/null
+++ b/libexec/post-receive.d/01-mail-notify
@@ -0,0 +1,39 @@
1#!/bin/sh
2#
3# Copyright (c) 2013 Nagios Plugins Development Team
4#
5# Originally written by Holger Weiss <holger@zedat.fu-berlin.de>.
6#
7# This file is free software; the Nagios Plugins Development Team gives
8# unlimited permission to copy and/or distribute it, with or without
9# modifications, as long as this notice is preserved.
10#
11# This program is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY, to the extent permitted by law; without even the implied
13# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
15set -e
16set -u
17
18test "${PWD##*/}" = 'site.git' && exit 0 # Don't report site.git updates.
19
20prefix=$PWD # $GIT_DIR
21recipient='nagiosplug-checkins@lists.sourceforge.net'
22maxcommits=25
23maxdiffsize=$((300 * 1024))
24gitweburl="FIXME"
25gitnotify='/home/plugins/libexec/git-notify'
26statedir="$prefix/info"
27statefile="$statedir/git-notify.dat"
28
29test -n "$recipient" || exit 0
30
31exec "$gitnotify" \
32 -m "$recipient" \
33 -n "$maxcommits" \
34 -s "$maxdiffsize" \
35 -t "$statefile" \
36 -A \
37 -C \
38 -T \
39 -z