projects
/
diogenes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ba1faac
)
merge changes to diogenes.postrm
author
Jeremy Laine
<jeremy.laine@m4x.org>
Sun, 8 Jul 2007 19:45:07 +0000
(19:45 +0000)
committer
Jeremy Laine
<jeremy.laine@m4x.org>
Sun, 8 Jul 2007 19:45:07 +0000
(19:45 +0000)
debian/diogenes.postrm
patch
|
blob
|
blame
|
history
diff --git
a/debian/diogenes.postrm
b/debian/diogenes.postrm
index
4d82e3f
..
ded38b7
100644
(file)
--- a/
debian/diogenes.postrm
+++ b/
debian/diogenes.postrm
@@
-31,8
+31,6
@@
remove_from_webconfig () {
fi
}
fi
}
-. /usr/share/debconf/confmodule
-db_version 2.0
# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
. /usr/share/dbconfig-common/dpkg/postrm.mysql
# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
. /usr/share/dbconfig-common/dpkg/postrm.mysql
@@
-42,34
+40,46
@@
fi
ACTION=$1
case "$ACTION" in
remove)
ACTION=$1
case "$ACTION" in
remove)
-
#
#
- # Only try to remove Diogenes from the webserver configs if the db key
- # diogenes/webservers exists. If not, Diogenes had not been installed
- # correctly so we just skip the webserver part
+ # Remove Diogenes from the webserver configuration
#
#
- if db_get "diogenes/webservers"; then
- remove_from_webconfig
+ if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_version 2.0
+
+ #
+ # Only try to remove Diogenes from the webserver configs if the db key
+ # diogenes/webservers exists. If not, Diogenes had not been installed
+ # correctly so we just skip the webserver part
+ #
+ if db_get "diogenes/webservers"; then
+ remove_from_webconfig
+ fi
fi
;;
purge)
fi
;;
purge)
-
#
# Remove ucf-managed files
#
#
# Remove ucf-managed files
#
- for myfile in /etc/diogenes/apache.conf /etc/diogenes/diogenes.debian.inc.php; do
- ucf --purge $myfile
- rm -f $myfile $myfile.dpkg-dist $myfile.dpkg-new $myfile.dpkg-old
- done
+ if [ -x $(which ucf) ] ; then
+ for myfile in /etc/diogenes/apache.conf /etc/diogenes/diogenes.debian.inc.php; do
+ ucf --purge $myfile
+ rm -f $myfile $myfile.dpkg-dist $myfile.dpkg-new $myfile.dpkg-old
+ done
+ fi
#
# If we were asked to, purge Diogenes data
#
#
# If we were asked to, purge Diogenes data
#
- db_get "diogenes/purge_removes_data"
- if [ "$RET" = "true" ]; then
- # remove files
- rm -rf /var/spool/diogenes /var/lib/diogenes
+ if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_version 2.0
+ db_get "diogenes/purge_removes_data"
+ if [ "$RET" = "true" ]; then
+ # remove files
+ rm -rf /var/spool/diogenes /var/lib/diogenes
+ fi
fi
;;
fi
;;