From 4ab769579b0aeafd81878ddb332b726c44dc2ffc Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Thu, 29 Sep 2011 11:36:39 +0000 Subject: improve webserver docu and sample script --- bin/smokeping_cgi | 16 +++++++--------- doc/smokeping_install.pod | 2 ++ htdocs/Makefile.am | 5 ++++- htdocs/smokeping.cgi.dist | 4 ---- htdocs/smokeping.fcgi.dist | 2 -- 5 files changed, 13 insertions(+), 16 deletions(-) delete mode 100755 htdocs/smokeping.cgi.dist diff --git a/bin/smokeping_cgi b/bin/smokeping_cgi index bedc6ff..6af8bf8 100755 --- a/bin/smokeping_cgi +++ b/bin/smokeping_cgi @@ -14,7 +14,7 @@ $SIG{CHLD} = 'IGNORE'; use CGI::Carp qw(fatalsToBrowser); -use Smokeping 2.005000; +use Smokeping; use CGI::Fast; @@ -37,7 +37,7 @@ as they are required by people looking at the pages. =head1 DESCRIPTION -To get B going, you need a webserver which allows you to run +To get B going, you need a webserver which allows you to run CGI or better FastCGI scripts. The system must be setup so that the cgi process is allowed to write to the image caching area as defined in the config file. @@ -51,13 +51,11 @@ Please refer to the installation document for detailed setup instructions. =head1 SETUP -When installing SmokePing, I recomend to place a little shell wrapper -into your htdocs directory, to launch the actual smokeping.cgi process: - - #!/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 +There is a sample F directory in your smokeping installation root. +Copy its content to the place where your webserver expects its files. +There are also two sample cgi scripts showing how to launch the +smokeping cgi in your website. The only difference is the file extension. +Adjust the paths in the script and you should be ready to go. =head1 COPYRIGHT diff --git a/doc/smokeping_install.pod b/doc/smokeping_install.pod index 75e93ff..b95c6cd 100644 --- a/doc/smokeping_install.pod +++ b/doc/smokeping_install.pod @@ -199,6 +199,8 @@ your F tree. Check out L for further information. When you can now also open the smokeping.cgi webpage to look at your data. +See the L documentation on how to setup the smokeping web interface. + =head1 COPYRIGHT Copyright (c) 2001, 2011 by Tobias Oetiker. All right reserved. diff --git a/htdocs/Makefile.am b/htdocs/Makefile.am index 11b69e7..d8c592c 100644 --- a/htdocs/Makefile.am +++ b/htdocs/Makefile.am @@ -27,5 +27,8 @@ EXTRA_DIST = $(JS) $(CGI) jsdir = $(DESTDIR)$(HTDOCSDIR) nobase_js_DATA = $(JS) -js_SCRIPTS = $(CGI) +install-data-local: + $(ECHO) "#!/bin/sh" > $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist + $(ECHO) "$(prefix)/bin/smokeping_cgi $(prefix)/etc/config" >> $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist + chmod +x $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist diff --git a/htdocs/smokeping.cgi.dist b/htdocs/smokeping.cgi.dist deleted file mode 100755 index 193e2aa..0000000 --- a/htdocs/smokeping.cgi.dist +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 index 193e2aa..bb3aef8 100755 --- a/htdocs/smokeping.fcgi.dist +++ b/htdocs/smokeping.fcgi.dist @@ -1,4 +1,2 @@ #!/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 -- cgit v1.2.3-24-g4f1b