From aa916bc92a8a239c30b03bac06a0f0fc468a846b Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 10 Dec 2019 15:49:01 +1000 Subject: Add stuff needed for those detailed graphs using apt-panopticon_cgp. --- README.md | 31 +++++++++++++++++++++++++++++++ apt-panopticon-report-email-web.lua | 3 ++- apt-panopticron | 2 ++ update_apt-panopticon | 16 ++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 apt-panopticron create mode 100755 update_apt-panopticon diff --git a/README.md b/README.md index fd7849e..b976be6 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,37 @@ installed - * rrdtool, may need to include lua-rrd. * xz, on Debian based systems it'll be in the xz-utils package. +If you want to have lots of graphs, also install +[https://sledjhamr.org/cgit/apt-panopticon_cgp/](https://sledjhamr.org/cgit/apt-panopticon_cgp/). + +Web installation. +----------------- + +This is a suggestion for installation on a Devuan based web server. + +Create - + +/var/www/html/apt-panopticon + +Install apt-panopticon and apt-panopticon_cgp there, so you end up with - + +/var/www/html/apt-panopticon/apt-panopticon +/var/www/html/apt-panopticon/apt-panopticon_cgp + +The script update_apt-panopticon is an example script for updating +everything, including commented out commands to update the source code. +The file apt-panopticron is an example crontab file for updating +everything once every ten minutes. They assume your web server user is +www-data with a group of www-data, and you have a mirror user called +mirrors. For mirror operators, that mirrors user would be the owner of +the mirror files. You can change these to suite yourself. + +Once everything is updated, +/var/www/html/apt-panopticon/results/Report-web.html + +will point to the main web page, and there will be a link at the bottom of +that pointing to the detailed graphs. + Using it. --------- diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 7d4b0fc..154aa99 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua @@ -429,8 +429,9 @@ if nil == web then C("opening mirrors file - " .. e) else "pkgmaster.devuan.org is the master mirror, all the others sync to it.   " .. "

\n" ) - web:write( "\n
\n
\n\n" .. web:write(APT.dumpTableHTML(m, "", "")) + web:write( "\n
\n
\n

==== Graphs: ====

\n" .. + "\n
\n

More graphs.


\n\n" .. "

The email report.   " .. "All the logs and other output.   " .. "You can get the source code here.

" .. diff --git a/apt-panopticron b/apt-panopticron new file mode 100644 index 0000000..204a516 --- /dev/null +++ b/apt-panopticron @@ -0,0 +1,2 @@ +# Mirror tests every 10 minutes everyday +*/10 * * * * www-data /var/www/html/apt-panopticon/apt-panopticon/update_apt-panopticon diff --git a/update_apt-panopticon b/update_apt-panopticon new file mode 100755 index 0000000..b70f4c3 --- /dev/null +++ b/update_apt-panopticon @@ -0,0 +1,16 @@ +#!/bin/bash + +cd /var/www/html/apt-panopticon/apt-panopticon_cgp +#git pull > /dev/null +#chown -R mirrors:www-data * +cd /var/www/html/apt-panopticon/apt-panopticon +#git pull > /dev/null +#chown -R mirrors:www-data * + +if [ ! -f apt-panopticon.lock ] ; then + rm ../results; ln -s apt-panopticon/results_old ../results + flock -n apt-panopticon.lock ./apt-panopticon.lua && rm apt-panopticon.lock + rm ../results; ln -s apt-panopticon/results ../results +fi + +#chown -R mirrors:www-data /var/www/html/SledjHamr/apt-panopticon/results -- cgit v1.1