Skip to content

Commit

Permalink
Merge pull request #25 from nextcloud/master
Browse files Browse the repository at this point in the history
double quote $RESULT
  • Loading branch information
Ezra authored Jan 31, 2017
2 parents 4dce7a8 + 9bf54e9 commit 26b24dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nextcloud-startup-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -509,15 +509,14 @@ dpkg-reconfigure openssh-server

# Generate new MySQL password
echo
bash $SCRIPTS/change_mysql_pass.sh
bash $SCRIPTS/change_mysql_pass.sh && wait
if [ $? -eq 0 ]
then
rm $SCRIPTS/change_mysql_pass.sh
echo "[mysqld]" >> /root/.my.cnf
echo "innodb_large_prefix=on" >> /root/.my.cnf
echo "innodb_file_format=barracuda" >> /root/.my.cnf
echo "innodb_file_per_table=1" >> /root/.my.cnf
sleep 3
fi

# Enable UTF8mb4 (4-byte support)
Expand All @@ -526,7 +525,7 @@ PW_FILE=/var/mysql_password.txt
echo
echo "Enabling UTF8mb4 support on $NCDB...."
sudo /etc/init.d/mysql restart
RESULT=`mysqlshow --user=root --password=$(cat $PW_FILE) $NCDB| grep -v Wildcard | grep -o $NCDB`
RESULT="mysqlshow --user=root --password=$(cat $PW_FILE) $NCDB| grep -v Wildcard | grep -o $NCDB"
if [ "$RESULT" == "$NCDB" ]; then
mysql -u root -e "ALTER DATABASE $NCDB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
fi
Expand Down

0 comments on commit 26b24dc

Please # to comment.