check_logfiles: 3.7.5.1
[omd.git] / packages / icinga / ssi-wrapper.pl
blob5fa49ed21dee11a00d54b9f845c95c8b3afb5824
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/icinga/ssi/%s", $site[1], $ssi);
9 if( -x $file ){
10 open (FH, '-|', $file);
11 while(<FH>){
12 print;
14 exit 0;
16 if( -e $file ){
17 open (FH, $file);
18 while(<FH>){
19 print;
21 exit 0;
23 exit 0;