diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-02 13:16:24 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-02 13:16:24 +0200 |
commit | b15adb7762b6caaecaa83637abfcf5fdb4802092 (patch) | |
tree | 64eddbe2aa1a7f98a140be0f7973f05d7a781ae0 /contrib/check_joy.sh | |
parent | c4d5882b9e1d07c7b61091062b7d085fa5f00284 (diff) | |
download | monitoring-plugins-b15adb7762b6caaecaa83637abfcf5fdb4802092.tar.gz |
Remove "contrib" plugins
These days, sites such as "Nagios Exchange" are a much better place for
publishing plugins not maintained by the Plugins Development Team.
Diffstat (limited to 'contrib/check_joy.sh')
-rwxr-xr-x | contrib/check_joy.sh | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/contrib/check_joy.sh b/contrib/check_joy.sh deleted file mode 100755 index 8783a59f..00000000 --- a/contrib/check_joy.sh +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | ||
4 | |||
5 | PROGNAME=`basename $0` | ||
6 | PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` | ||
7 | REVISION=`echo '$Revision: 2 $' | sed -e 's/[^0-9.]//g'` | ||
8 | STATUS="" | ||
9 | |||
10 | . $PROGPATH/utils.sh | ||
11 | |||
12 | |||
13 | print_usage() { | ||
14 | echo "Usage: $PROGNAME /dev/js<#> <button #>" | ||
15 | } | ||
16 | |||
17 | print_help() { | ||
18 | print_revision $PROGNAME $REVISION | ||
19 | echo "" | ||
20 | print_usage | ||
21 | echo "" | ||
22 | echo "This plugin checks a joystick button status using the " | ||
23 | echo "joyreadbutton utility from the joyd package." | ||
24 | echo "" | ||
25 | support | ||
26 | exit 0 | ||
27 | } | ||
28 | |||
29 | if [ $# -ne 2 ]; then | ||
30 | print_usage | ||
31 | exit 0 | ||
32 | fi | ||
33 | |||
34 | case "$1" in | ||
35 | --help) | ||
36 | print_help | ||
37 | exit 0 | ||
38 | ;; | ||
39 | -h) | ||
40 | print_help | ||
41 | exit 0 | ||
42 | ;; | ||
43 | --version) | ||
44 | print_revision $PROGNAME $REVISION | ||
45 | exit 0 | ||
46 | ;; | ||
47 | -V) | ||
48 | print_revision $PROGNAME $REVISION | ||
49 | exit 0 | ||
50 | ;; | ||
51 | /dev/js*) | ||
52 | joyreadbutton $1 $2 1>&1 1>/dev/null | ||
53 | STATUS=$? | ||
54 | if [ "$STATUS" -eq 0 ]; then | ||
55 | echo OK | ||
56 | exit 0 | ||
57 | elif [ "$STATUS" -eq 1 ];then | ||
58 | echo CRITICAL | ||
59 | exit 2 | ||
60 | else | ||
61 | echo UNKNOWN | ||
62 | exit -1 | ||
63 | fi | ||
64 | ;; | ||
65 | *) | ||
66 | print_usage | ||
67 | exit 0 | ||
68 | ;; | ||
69 | esac | ||