diff options
author | Bernd Arnold <wopfel@gmail.com> | 2018-05-30 19:11:06 +0200 |
---|---|---|
committer | Bernd Arnold <wopfel@gmail.com> | 2018-05-30 19:11:06 +0200 |
commit | de0872e2d71caec807c659c7f518adcbefe7e665 (patch) | |
tree | bd5be2579bfa3407283e239879a96059e0d5443e /plugins-scripts/check_uptime | |
parent | 96c8dd89353be67d44ce7a21b90f621ad89a2984 (diff) | |
download | monitoring-plugins-de0872e.tar.gz |
Replaced my values with macros
Diffstat (limited to 'plugins-scripts/check_uptime')
-rwxr-xr-x | plugins-scripts/check_uptime | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins-scripts/check_uptime b/plugins-scripts/check_uptime index 4bc95282..09600df4 100755 --- a/plugins-scripts/check_uptime +++ b/plugins-scripts/check_uptime | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/perl -w | 1 | #!@PERL@ -w |
2 | 2 | ||
3 | # check_uptime - check uptime to see how long the system is running. | 3 | # check_uptime - check uptime to see how long the system is running. |
4 | # | 4 | # |
@@ -29,14 +29,13 @@ use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c | |||
29 | $status $state $msg); | 29 | $status $state $msg); |
30 | use FindBin; | 30 | use FindBin; |
31 | use lib "$FindBin::Bin"; | 31 | use lib "$FindBin::Bin"; |
32 | use lib "/usr/lib/monitoring-plugins/"; | ||
33 | use utils qw(%ERRORS &print_revision &support &usage ); | 32 | use utils qw(%ERRORS &print_revision &support &usage ); |
34 | 33 | ||
35 | sub print_help (); | 34 | sub print_help (); |
36 | sub print_usage (); | 35 | sub print_usage (); |
37 | sub process_arguments (); | 36 | sub process_arguments (); |
38 | 37 | ||
39 | #$ENV{'PATH'}='/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'; | 38 | $ENV{'PATH'}='@TRUSTED_PATH@'; |
40 | $ENV{'BASH_ENV'}=''; | 39 | $ENV{'BASH_ENV'}=''; |
41 | $ENV{'ENV'}=''; | 40 | $ENV{'ENV'}=''; |
42 | $PROGNAME = "check_uptime"; | 41 | $PROGNAME = "check_uptime"; |
@@ -158,7 +157,7 @@ sub process_arguments(){ | |||
158 | ); | 157 | ); |
159 | 158 | ||
160 | if ($opt_V) { | 159 | if ($opt_V) { |
161 | print_revision($PROGNAME,'2.2'); | 160 | print_revision($PROGNAME,'@NP_VERSION@'); |
162 | exit $ERRORS{'UNKNOWN'}; | 161 | exit $ERRORS{'UNKNOWN'}; |
163 | } | 162 | } |
164 | 163 | ||
@@ -232,7 +231,7 @@ sub print_usage () { | |||
232 | } | 231 | } |
233 | 232 | ||
234 | sub print_help () { | 233 | sub print_help () { |
235 | print_revision($PROGNAME,'2.2'); | 234 | print_revision($PROGNAME,'@NP_VERSION@'); |
236 | print "Copyright (c) 2002 Subhendu Ghosh/Carlos Canau/Benjamin Schmid\n"; | 235 | print "Copyright (c) 2002 Subhendu Ghosh/Carlos Canau/Benjamin Schmid\n"; |
237 | print "Copyright (c) 2018 Bernd Arnold\n"; | 236 | print "Copyright (c) 2018 Bernd Arnold\n"; |
238 | print "\n"; | 237 | print "\n"; |