Fix: Package debian uninstall

This commit is contained in:
Laurent Destailleur 2009-10-27 23:39:05 +00:00
parent 182139d740
commit 8fb1d90f42
3 changed files with 16 additions and 6 deletions

View File

@ -46,7 +46,10 @@ echo Run the postinst script
case "$1" in
configure)
configorig="/usr/share/dolibarr/build/deb/apache.conf"
config="/etc/dolibarr/apache.conf"
mkdir -p /etc/dolibarr
cp -pr $configorig $config
#db_reset "dolibarr/webserver"
@ -118,4 +121,4 @@ db_stop
#DEBHELPER#
exit 0
exit 0

View File

@ -49,14 +49,21 @@ case "$1" in
fi
rm -rf /etc/dolibarr
for server in $webservers ; do
error=""
conffile="/etc/$server/httpd.conf"
# We disable set -e because script apache-uninclude.sh return error if not
set +e
. /usr/share/wwwconfig-common/apache-uninclude.sh
set -e
# if [ "x$error" != "x" ] ;
# then echo $error
# fi
if [ "$status" = "purge" ] ;
then restart="$restart $server"
fi
done
rm -rf /etc/dolibarr
servers="apache2-ssl apache2 mysql"
. /usr/share/wwwconfig-common/restart.sh

View File

@ -387,8 +387,8 @@ if ($nboftargetok) {
print "Create directory $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/$PROJECT/documents"`;
print "Create directory $BUILDROOT/$PROJECT/etc/$PROJECT\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
#print "Create directory $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`mkdir -p "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
#print "Copy changelog file into $BUILDROOT/$PROJECT/DEBIAN\n";
#$ret=`cp "$SOURCE/ChangeLog" "$BUILDROOT/$PROJECT/DEBIAN/changelog"`;
@ -399,8 +399,8 @@ if ($nboftargetok) {
print "Copy copyright file into $BUILDROOT/$PROJECT/DEBIAN\n";
$ret=`cp "$SOURCE/COPYRIGHT" "$BUILDROOT/$PROJECT/DEBIAN/copyright"`;
print "Copy apache conf file into $BUILDROOT/$PROJECT/etc/$PROJECT\n";
$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
#print "Copy apache conf file into $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
print "Set permissions/owners on files/dir\n";
$ret=`chown -R root.root $BUILDROOT/$PROJECT`;