Fix: Package debian uninstall
This commit is contained in:
parent
182139d740
commit
8fb1d90f42
@ -46,7 +46,10 @@ echo Run the postinst script
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
|
configorig="/usr/share/dolibarr/build/deb/apache.conf"
|
||||||
config="/etc/dolibarr/apache.conf"
|
config="/etc/dolibarr/apache.conf"
|
||||||
|
mkdir -p /etc/dolibarr
|
||||||
|
cp -pr $configorig $config
|
||||||
|
|
||||||
#db_reset "dolibarr/webserver"
|
#db_reset "dolibarr/webserver"
|
||||||
|
|
||||||
@ -118,4 +121,4 @@ db_stop
|
|||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@ -49,14 +49,21 @@ case "$1" in
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf /etc/dolibarr
|
|
||||||
for server in $webservers ; do
|
for server in $webservers ; do
|
||||||
|
error=""
|
||||||
conffile="/etc/$server/httpd.conf"
|
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
|
. /usr/share/wwwconfig-common/apache-uninclude.sh
|
||||||
|
set -e
|
||||||
|
# if [ "x$error" != "x" ] ;
|
||||||
|
# then echo $error
|
||||||
|
# fi
|
||||||
if [ "$status" = "purge" ] ;
|
if [ "$status" = "purge" ] ;
|
||||||
then restart="$restart $server"
|
then restart="$restart $server"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
rm -rf /etc/dolibarr
|
||||||
|
|
||||||
servers="apache2-ssl apache2 mysql"
|
servers="apache2-ssl apache2 mysql"
|
||||||
. /usr/share/wwwconfig-common/restart.sh
|
. /usr/share/wwwconfig-common/restart.sh
|
||||||
|
|||||||
@ -387,8 +387,8 @@ if ($nboftargetok) {
|
|||||||
print "Create directory $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents\n";
|
print "Create directory $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents\n";
|
||||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/$PROJECT/documents"`;
|
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/$PROJECT/documents"`;
|
||||||
|
|
||||||
print "Create directory $BUILDROOT/$PROJECT/etc/$PROJECT\n";
|
#print "Create directory $BUILDROOT/$PROJECT/etc/$PROJECT\n";
|
||||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
|
#$ret=`mkdir -p "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
|
||||||
|
|
||||||
#print "Copy changelog file into $BUILDROOT/$PROJECT/DEBIAN\n";
|
#print "Copy changelog file into $BUILDROOT/$PROJECT/DEBIAN\n";
|
||||||
#$ret=`cp "$SOURCE/ChangeLog" "$BUILDROOT/$PROJECT/DEBIAN/changelog"`;
|
#$ret=`cp "$SOURCE/ChangeLog" "$BUILDROOT/$PROJECT/DEBIAN/changelog"`;
|
||||||
@ -399,8 +399,8 @@ if ($nboftargetok) {
|
|||||||
print "Copy copyright file into $BUILDROOT/$PROJECT/DEBIAN\n";
|
print "Copy copyright file into $BUILDROOT/$PROJECT/DEBIAN\n";
|
||||||
$ret=`cp "$SOURCE/COPYRIGHT" "$BUILDROOT/$PROJECT/DEBIAN/copyright"`;
|
$ret=`cp "$SOURCE/COPYRIGHT" "$BUILDROOT/$PROJECT/DEBIAN/copyright"`;
|
||||||
|
|
||||||
print "Copy apache conf file into $BUILDROOT/$PROJECT/etc/$PROJECT\n";
|
#print "Copy apache conf file into $BUILDROOT/$PROJECT/etc/$PROJECT\n";
|
||||||
$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
|
#$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
|
||||||
|
|
||||||
print "Set permissions/owners on files/dir\n";
|
print "Set permissions/owners on files/dir\n";
|
||||||
$ret=`chown -R root.root $BUILDROOT/$PROJECT`;
|
$ret=`chown -R root.root $BUILDROOT/$PROJECT`;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user