Skip to content

Commit

Permalink
Fix: Package debian uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 27, 2009
1 parent 182139d commit 8fb1d90
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion build/deb/postinst
Expand Up @@ -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"

Expand Down Expand Up @@ -118,4 +121,4 @@ db_stop

#DEBHELPER#

exit 0
exit 0
9 changes: 8 additions & 1 deletion build/deb/postrm
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions build/makepack-dolibarr.pl
Expand Up @@ -387,8 +387,8 @@
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"`;
Expand All @@ -399,8 +399,8 @@
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`;
Expand Down

0 comments on commit 8fb1d90

Please sign in to comment.