diff --git a/build/debian/dolibarr.postinst b/build/debian/dolibarr.postinst index 00b1601ce00..f45ab7680c4 100644 --- a/build/debian/dolibarr.postinst +++ b/build/debian/dolibarr.postinst @@ -41,11 +41,6 @@ enable_install_upgrade_wizard() { } apache_install() { - # Apache 2 setup - if which a2enmod >/dev/null 2>&1 ;then - a2enmod alias - fi - webserver=$1 if which a2enconf >/dev/null 2>&1 ;then # a2enconf exists for ubuntu only @@ -92,6 +87,12 @@ case "$1" in else echo This is not a first install fi + + # Apache 2 setup + if which a2enmod >/dev/null 2>&1 ;then + a2enmod alias + fi + apache_install lighttpd_install diff --git a/build/debian/dolibarr.postrm b/build/debian/dolibarr.postrm index 38ebf8399c2..fa16ed582f0 100644 --- a/build/debian/dolibarr.postrm +++ b/build/debian/dolibarr.postrm @@ -177,18 +177,19 @@ case "$1" in passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'" fi mysqlcmd="mysql $hostopt $passopt -u $dbadmin" - + mysqlcmdnopass="mysql $hostopt -u $dbadmin" + # Now run the drop user if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then echo postrm Database login $dbuser@localhost removed else - error="Unable to run $mysqlcmd -f -e \"DROP USER '$dbuser'@'localhost';\"" + error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\"" echo postrm $error fi if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then echo postrm Database login $dbuser@% removed else - error="Unable to run $mysqlcmd -f -e \"DROP USER '$dbuser'@'%';\"" + error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\"" echo postrm $error fi