Control: tags -1 + patch Hello Ignace
Attached is a patch for #669856 Also available at https://github.com/ghantoos/debian-iptotal/pull/1 (Beware postrm is removed and not emptied) Ping me if you need a sponsor.
commit 728020da9537f720cefff974d1fcb2289faec362 Author: Jean-Michel Vourgère <nir...@debian.org> Date: Thu May 19 11:23:16 2016 +0200 Migate to apache2.4 (#669856) diff --git a/debian/README.debian b/debian/README.debian index 2968c93..c7ab309 100644 --- a/debian/README.debian +++ b/debian/README.debian @@ -1,11 +1,3 @@ -Using iptotal with Apache2: ---------------------------- -An apache configuration file template is shipped with this package. In order to -use it, it should be symlinked inside apache2's configuration folder: - $ sudo ln -s /etc/iptotal/apache.conf /etc/apache2/conf.d/ -Then reload apache2 configuration: - $ sudo /etc/init.d/apache2 reload - Note concerning iptotal's data directory: ----------------------------------------- Some important changes have been applied to iptotal's data directory over the diff --git a/debian/apache.conf b/debian/apache.conf deleted file mode 100644 index 0fd7805..0000000 --- a/debian/apache.conf +++ /dev/null @@ -1,9 +0,0 @@ -Alias /iptotal /var/lib/iptotal/ - -<Directory /var/lib/iptotal> - Options +FollowSymLinks - AllowOverride None - order allow,deny - allow from all - DirectoryIndex template.html -</Directory> diff --git a/debian/control b/debian/control index fc81377..b8b635e 100644 --- a/debian/control +++ b/debian/control @@ -3,20 +3,25 @@ Section: admin Priority: extra Maintainer: Ignace Mouzannar <mouzan...@gmail.com> DM-Upload-Allowed: yes -Build-Depends: debhelper (>= 7.0.50~), libpcap-dev, rrdtool, autotools-dev (>=20100122.1) +Build-Depends: autotools-dev (>=20100122.1), + debhelper (>= 7.0.50~), + dh-apache2, + libpcap-dev, + rrdtool Standards-Version: 3.9.2 Homepage: http://sourceforge.net/projects/iptotal Package: iptotal Architecture: any -Depends: rrdtool, tcpdump, apache2 | httpd, ${shlibs:Depends}, ${misc:Depends} +Depends: rrdtool, tcpdump, ${misc:Depends}, ${shlibs:Depends} +Recommends: ${misc:Recommends} Description: monitor for IP traffic, not requiring SNMP iptotal is yet another IP traffic monitor. It listens to a network interface in non-promiscuous mode, and measures IP bandwidth usage. After the specified number of seconds, the average throughput is printed at total, input and output usage. - . + . The utility can be used to measure bandwidth usage without the need for an SNMP daemon. In combination with a simple script and rrdtool it can be used to present the measured data in graphical format e.g. through a web interface. - The package contains www + CGI sample files. + The package contains www + CGI sample files. diff --git a/debian/install b/debian/install index 2344372..47e35c7 100644 --- a/debian/install +++ b/debian/install @@ -1,3 +1,2 @@ -debian/apache.conf /etc/iptotal/ debian/iptotal/var/lib/iptotal/template.html /usr/share/iptotal/www/ debian/iptotal/var/lib/iptotal/images/ /usr/share/iptotal/www/ diff --git a/debian/iptotal.apache2 b/debian/iptotal.apache2 new file mode 100644 index 0000000..db3cf62 --- /dev/null +++ b/debian/iptotal.apache2 @@ -0,0 +1 @@ +conf debian/iptotal.conf diff --git a/debian/iptotal.conf b/debian/iptotal.conf new file mode 100644 index 0000000..4e2c0b8 --- /dev/null +++ b/debian/iptotal.conf @@ -0,0 +1,8 @@ +Alias /iptotal /var/lib/iptotal/ + +<Directory /var/lib/iptotal> + Options +FollowSymLinks + AllowOverride None + Require all granted + DirectoryIndex template.html +</Directory> diff --git a/debian/postinst b/debian/postinst index e382ae8..fb67bf7 100644 --- a/debian/postinst +++ b/debian/postinst @@ -47,7 +47,13 @@ case "$1" in done # change ownership to www-data - chown -R www-data:www-data /var/lib/iptotal/* + chown -R www-data:www-data /var/lib/iptotal/* + + # enable cgi + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke enmod cgi + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/postrm b/debian/postrm deleted file mode 100644 index 1719405..0000000 --- a/debian/postrm +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - purge|remove) - # reload apache2 configuration - invoke-rc.d apache2 reload - ;; - - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index dca67c1..68a0e33 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh --with autotools_dev $@ + dh $@ --with autotools_dev,apache2 override_dh_auto_configure: dh_auto_configure -- --datadir=/var/lib/iptotal --sysconfdir=/etc/iptotal