From ef79c9d8f560b7b678f20372df0725f1eee70ae9 Mon Sep 17 00:00:00 2001 From: hfrenzel-guest Date: Thu, 18 Oct 2007 22:34:01 +0000 Subject: [PATCH] added debian/postrm and fixed symlinks to maps/templates git-svn-id: svn://svn.debian.org/svn/pkg-nagios/nagvis/trunk@1243 98d490a6-b407-0410-aaaa-fdee166ba3f5 --- debian/changelog | 8 +++++++ debian/links | 2 ++ debian/postinst | 5 +++- debian/postrm | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 debian/postrm diff --git a/debian/changelog b/debian/changelog index 6361db9..e89bdf3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +nagvis (1:1.1-2) unstable; urgency=low + + * Symlinked images/maps and images/tempates to the apropriate directory below + /etc/nagvis + * Added missing debian/postrm + + -- Hendrik Frenzel Fri, 19 Oct 2007 00:30:05 +0200 + nagvis (1:1.1-1) unstable; urgency=low * New upstream release diff --git a/debian/links b/debian/links index ca706d4..b7e513b 100644 --- a/debian/links +++ b/debian/links @@ -1,3 +1,5 @@ etc/nagvis/maps usr/share/nagvis/htdocs/nagvis/etc/maps +etc/nagvis/maps usr/share/nagvis/htdocs/nagvis/htdocs/nagvis/images/maps etc/nagvis/templates usr/share/nagvis/htdocs/nagvis/etc/templates +etc/nagvis/templates usr/share/nagvis/htdocs/nagvis/htdocs/nagvis/images/templates usr/share/nagvis/htdocs usr/share/nagios2/htdocs/nagvis diff --git a/debian/postinst b/debian/postinst index 924f94b..d33d937 100644 --- a/debian/postinst +++ b/debian/postinst @@ -48,10 +48,13 @@ case "$1" in test -f $f && setperm www-data www-data 0644 $f test -d $f && setperm www-data www-data 0755 $f done - setperm www-data www-data 0775 /usr/share/nagvis/htdocs/nagvis/images/maps setperm www-data www-data 0775 /usr/share/nagvis/htdocs/nagvis/etc/maps ucf /usr/share/nagvis/debian/apache.conf /etc/nagvis/apache.conf + #if ! [ -e /etc/apache2/conf.d/nagvis.conf ]; then + # ln -s /etc/nagvis/apache.conf /etc/apache2/conf.d/nagvis.conf + #fi + ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..f1b9e50 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,59 @@ +#!/bin/sh +# postrm script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -f /usr/share/dbconfig-common/dpkg/postrm.@@DB@@ ]; then + . /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql + dbc_go nagvis $@ +fi + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +if [ "$1" = "purge" ]; then + for file in apache.conf config.ini.php; do + rm -f /etc/nagvis/$file + ucf --purge /etc/nagvis/$file + done + + #if [ -e /etc/apache2/conf.d/nagvis.conf ]; then + # rm -f /etc/apache2/conf.d/nagvis.conf + #fi +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + -- 2.30.2