Update embedded libev code to version 4.22
[nsca-ng.git] / contrib / disable_notifications
blobf773843f46716b5e04fdac739df44b2469f0bdb5
1 #!/bin/sh
3 # Copyright (c) 2013 Holger Weiss <holger@weiss.in-berlin.de>
5 # This file is free software; Holger Weiss gives unlimited permission to copy
6 # and/or distribute it, with or without modifications, as long as this notice is
7 # preserved.
9 # This program is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY, to the extent permitted by law; without even the implied
11 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 set -e
14 set -u
16 send_nsca_args=${SEND_NSCA_ARGS:+$SEND_NSCA_ARGS}
18 die()
20 echo >&2 "$@"
21 exit 1
24 usage()
26 die "Usage: $0 [-c <config-file>]"
29 while getopts c:h option
31 case $option in
33 send_nsca_args="${send_nsca_args:+$send_nsca_args }-c $OPTARG"
35 h|\?)
36 usage
38 esac
39 done
41 shift `expr $OPTIND - 1`
42 test $# -eq 0 || usage
44 printf '%b' 'DISABLE_NOTIFICATIONS\n' | send_nsca -C $send_nsca_args
46 # vim:set joinspaces noexpandtab textwidth=80: