repo.or.cz
/
omd.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
check_oracle_health: update to 1.9.3.5
[omd.git]
/
packages
/
nagios
/
ssi-wrapper.pl
blob
bc4c818e37c6c6795d31528a927b73823faff394
1
#!/usr/bin/perl
2
##
3
## Site speicific SSI wrapper
4
##
5
use
File
::
Basename
;
6
$ssi
=
basename
(
$0
);
7
@site
=
split
(
/\/
/,
$ENV
{
'SCRIPT_NAME'
});
8
$file
=
sprintf
(
"/opt/omd/sites/
%s
/etc/nagios/ssi/
%s
"
,
$site
[
1
],
$ssi
);
9
if
( -
x
$file
){
10
open
(
FH
,
'-|'
,
$file
);
11
while
(<
FH
>){
12
print
;
13
}
14
exit
0
;
15
}
16
if
( -
e
$file
){
17
open
(
FH
,
$file
);
18
while
(<
FH
>){
19
print
;
20
}
21
exit
0
;
22
}
23
exit
0
;