diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2011-09-29 13:36:39 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2011-09-29 13:36:39 +0200 |
commit | 4ab769579b0aeafd81878ddb332b726c44dc2ffc (patch) | |
tree | 19bce950fe029dc5a322ac37f3810de2bfabe90f | |
parent | d6136cf5bb98c3b52d54f9b0c9042a54169bfb5b (diff) | |
download | smokeping-4ab769579b0aeafd81878ddb332b726c44dc2ffc.tar.gz smokeping-4ab769579b0aeafd81878ddb332b726c44dc2ffc.tar.xz |
improve webserver docu and sample script
-rwxr-xr-x | bin/smokeping_cgi | 16 | ||||
-rw-r--r-- | doc/smokeping_install.pod | 2 | ||||
-rw-r--r-- | htdocs/Makefile.am | 5 | ||||
-rwxr-xr-x | htdocs/smokeping.cgi.dist | 4 | ||||
-rwxr-xr-x | htdocs/smokeping.fcgi.dist | 2 |
5 files changed, 13 insertions, 16 deletions
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<smokeping.cgi> going, you need a webserver which allows you to run +To get B<smokeping_cgi> 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<htdocs> 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</etc/init.d> tree. Check out L<smokeping> for further information. When you can now also open the smokeping.cgi webpage to look at your data. +See the L<smokeping_cgi> 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 |