summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2011-09-25 17:39:36 +0200
committerTobi Oetiker <tobi@oetiker.ch>2011-09-25 17:39:36 +0200
commit595d31e93b261519631191330c9bde764064ede1 (patch)
treea76198e5f38d860783d395f7d1d66480ebdca486
parent7e6820cc9127828f84640831852f6a5badc784dc (diff)
downloadsmokeping-595d31e93b261519631191330c9bde764064ede1.tar.gz
smokeping-595d31e93b261519631191330c9bde764064ede1.tar.xz
added sample scripts
-rwxr-xr-xhtdocs/smokeping.cgi.dist94
-rwxr-xr-xhtdocs/smokeping.fcgi.dist4
2 files changed, 8 insertions, 90 deletions
diff --git a/htdocs/smokeping.cgi.dist b/htdocs/smokeping.cgi.dist
index 87e873f..690685f 100755
--- a/htdocs/smokeping.cgi.dist
+++ b/htdocs/smokeping.cgi.dist
@@ -1,90 +1,4 @@
-#!/usr/bin/speedy -w -- -r100 -t30 -M5 -gSmokePing
-
-# -*-perl-*-
-
-use strict;
-use warnings;
-
-use lib qw(/usr/pack/rrdtool-1.3.0-rp/lib/perl);
-use lib qw(/home/oetiker/checkouts/smokeping/trunk/software/lib);
-
-# don't bother with zombies
-$SIG{CHLD} = 'IGNORE';
-
-use CGI::Carp qw(fatalsToBrowser);
-
-use Smokeping 2.004002;
-
-Smokeping::cgi("/home/oetiker/checkouts/smokeping/trunk/software/etc/config.dist");
-
-=head1 NAME
-
-smokeping.cgi - SmokePing webfrontend
-
-=head1 OVERVIEW
-
-This script acts as a 'website' for your SmokePing monitoring operation. It
-presents the targets you are looking at in a tree structure and draws graphs
-as they are required by people looking at the pages.
-
-=head1 DESCRIPTION
-
-To get B<smokeping.cgi> going, you need a webserver which allows you to run
-cgi scripts. The system must be setup so that the B<smokeping.cgi> is
-allowed to write to the image caching area as defined in the config file.
-
-This script runs with normal perl. B<BUT> it will appear to be very slow,
-because it does a lot of things when starting up. So if the script has to be
-started a fresh on every click, this is both slow and a tough thing for your
-webserver. I therefore strongly recomment using SpeedyCGI.
-
-Please refer to the installation document for detailed setup instructions.
-
-=head1 SETUP
-
-When installing SmokePing, this file has to be adjusted to fit your
-local system. Three paths have to be entered.
-
- use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
-
-One pointing to your B<rrdtool> installation
-
- use lib qw(/home/oetiker/public_html/smokeping/lib);
-
-One pointing to the place where you have installed the SmokePing libraries
-
- use Smokeping;
-
- Smokeping::cgi("/home/oetiker/.smokeping/config");
-
-The third path is the argument to the Smokeping::cgi command. It points to
-the SmokePing configuration file.
-
-=head1 COPYRIGHT
-
-Copyright (c) 2001 by Tobias Oetiker. All right reserved.
-
-=head1 LICENSE
-
-This program is free software; you can redistribute it
-and/or modify it under the terms of the GNU General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be
-useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE. See the GNU General Public License for more
-details.
-
-You should have received a copy of the GNU General Public
-License along with this program; if not, write to the Free
-Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
-02139, USA.
-
-=head1 AUTHOR
-
-Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
-
-=cut
+#!/bin/sh
+# maybe add some extra perl search path
+# export PERL5LIB=/opt/rrdtool/lib/perl
+exec /opt/smokeping/bin/smokeping.cgi /opt/smokeping/etc/config
diff --git a/htdocs/smokeping.fcgi.dist b/htdocs/smokeping.fcgi.dist
new file mode 100755
index 0000000..690685f
--- /dev/null
+++ b/htdocs/smokeping.fcgi.dist
@@ -0,0 +1,4 @@
+#!/bin/sh
+# maybe add some extra perl search path
+# export PERL5LIB=/opt/rrdtool/lib/perl
+exec /opt/smokeping/bin/smokeping.cgi /opt/smokeping/etc/config