From 5ccb3558b9a22b05874e536351e8d41c6738cbe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Tue, 8 Jan 2013 20:44:17 +0000 Subject: [PATCH] cosmetic: reorder --- install/alternc.install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/alternc.install b/install/alternc.install index 911ad2c2..0f7be03a 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -417,9 +417,6 @@ fi chown alterncpanel:alterncpanel "$ALTERNC_LOC/html/"* setfacl -b -k -m d:g:alterncpanel:rw- -m g:alterncpanel:rw- "$ALTERNC_LOC/html/"* -# Creating admin user if needed -HAS_ROOT=`mysql --defaults-file=/etc/alternc/my.cnf -e "SELECT COUNT(*) FROM membres WHERE login = 'admin' OR login = 'root' and su = 1" | tail -1` - #creating log file if [ ! -e "/var/log/alternc/bureau.log" ]; then test -d "/var/log/alternc/" || mkdir -p "/var/log/alternc/" @@ -428,6 +425,9 @@ if [ ! -e "/var/log/alternc/bureau.log" ]; then chown alterncpanel:adm /var/log/alternc/bureau.log fi +# Creating admin user if needed +HAS_ROOT=`mysql --defaults-file=/etc/alternc/my.cnf -e "SELECT COUNT(*) FROM membres WHERE login = 'admin' OR login = 'root' and su = 1" | tail -1` + if [ "$HAS_ROOT" != "1" ]; then echo "Creating admin user..." echo ""