mysql connection chain fixed

This commit is contained in:
Diego Lendoiro 2017-05-23 15:54:34 +01:00
parent f4b8fc29d7
commit 1790c0842e
1 changed files with 1 additions and 2 deletions

View File

@ -99,8 +99,7 @@ gen_ssl_cert() {
install() {
local database=${db_host:-$(grep -m1 -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' $db_config)}
echo $database
tables=$(mysql -u $db_user -h $database -p -BN -e "SHOW TABLES FROM passbolt" -p${db_pass:-P4ssb0lt} |wc -l)
tables=$(mysql -u ${db_user:-passbolt} -h $database -p -BN -e "SHOW TABLES FROM passbolt" -p${db_pass:-P4ssb0lt} |wc -l)
if [ $tables -eq 0 ]; then
su -c "/var/www/passbolt/app/Console/cake install --send-anonymous-statistics true --no-admin" -ls /bin/bash nginx