Avoid duplicate a2en.

No pass into log.
This commit is contained in:
Laurent Destailleur 2014-02-02 19:19:41 +01:00
parent 77b3c9d2eb
commit 70c262a99f
2 changed files with 10 additions and 8 deletions

View File

@ -41,11 +41,6 @@ enable_install_upgrade_wizard() {
} }
apache_install() { apache_install() {
# Apache 2 setup
if which a2enmod >/dev/null 2>&1 ;then
a2enmod alias
fi
webserver=$1 webserver=$1
if which a2enconf >/dev/null 2>&1 ;then if which a2enconf >/dev/null 2>&1 ;then
# a2enconf exists for ubuntu only # a2enconf exists for ubuntu only
@ -92,6 +87,12 @@ case "$1" in
else else
echo This is not a first install echo This is not a first install
fi fi
# Apache 2 setup
if which a2enmod >/dev/null 2>&1 ;then
a2enmod alias
fi
apache_install apache_install
lighttpd_install lighttpd_install

View File

@ -177,18 +177,19 @@ case "$1" in
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'" passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
fi fi
mysqlcmd="mysql $hostopt $passopt -u $dbadmin" mysqlcmd="mysql $hostopt $passopt -u $dbadmin"
mysqlcmdnopass="mysql $hostopt -u $dbadmin"
# Now run the drop user # Now run the drop user
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then
echo postrm Database login $dbuser@localhost removed echo postrm Database login $dbuser@localhost removed
else 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 echo postrm $error
fi fi
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then
echo postrm Database login $dbuser@% removed echo postrm Database login $dbuser@% removed
else else
error="Unable to run $mysqlcmd -f -e \"DROP USER '$dbuser'@'%';\"" error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
echo postrm $error echo postrm $error
fi fi