Skip to content

Commit

Permalink
double quote $RESULT
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Hansson authored Jan 31, 2017
1 parent 18e2561 commit 9bf54e9
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 @@ -480,15 +480,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 @@ -497,7 +496,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 9bf54e9

Please # to comment.