[Pkg-owncloud-commits] [owncloud] 01/01: Test if confile exists before calling {en, dis}conf
David Prévot
taffit at moszumanska.debian.org
Wed Apr 9 19:44:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit f5c49fb3f7bc45dfbee5f168a8202740b246e6ab
Author: David Prévot <taffit at debian.org>
Date: Wed Apr 9 15:42:00 2014 -0400
Test if confile exists before calling {en,dis}conf
Closes: #742174
---
debian/postinst | 4 +++-
debian/postrm | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/debian/postinst b/debian/postinst
index 03b09e2..4a0d4a9 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -25,7 +25,9 @@ case "$1" in
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enmod rewrite
- apache2_invoke enconf $CONF
+ if [ -e /etc/apache2/conf-available/$CONF.conf ] ; then
+ apache2_invoke enconf $CONF || exit $?
+ fi
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
if [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF.conf ] ; then
ln -s ../conf-available/$CONF.conf /etc/apache2/conf.d/$CONF.conf
diff --git a/debian/postrm b/debian/postrm
index 2a372bc..e7ef59a 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -11,9 +11,9 @@ case "$1" in
rm -f /var/log/owncloud.log*
CONF="owncloud"
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
- if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+ if [ -e /usr/share/apache2/apache2-maintscript-helper ] && [ -e /etc/apache2/conf-enable/$CONF.conf ] ; then
. /usr/share/apache2/apache2-maintscript-helper
- apache2_invoke disconf $CONF
+ apache2_invoke disconf $CONF || exit $?
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
[ -L /etc/apache2/conf.d/$CONF.conf ] && rm /etc/apache2/conf.d/$CONF.conf
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list