diff --git a/nextcloud-startup-script.sh b/nextcloud-startup-script.sh index b6a06c44..3f05a075 100644 --- a/nextcloud-startup-script.sh +++ b/nextcloud-startup-script.sh @@ -275,9 +275,10 @@ echo "Please be patient, it may take a while." sudo /etc/init.d/mysql reload & spinner_loading #mysqladmin shutdown & spinner_loading #systemctl restart mariadb & spinner_loading -RESULT="mysqlshow --user=root --password=$MARIADBMYCNFPASS $NCCONFIGDB| grep -v Wildcard | grep -o $NCCONFIGDB" -if [ "$RESULT" == "$NCCONFIGDB" ]; then - check_command mysql -u root -e "ALTER DATABASE $NCCONFIGDB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" +RESULT="$(mysqlshow --user=root --password=$MARIADBMYCNFPASS $NCCONFIGDB | grep -v Wildcard | grep -o $NCCONFIGDB)" +if [ "$RESULT" == "$NCCONFIGDB" ] +then + check_command 'mysql -u root -e "ALTER DATABASE $NCCONFIGDB CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"' wait fi check_command sudo -u www-data $NCPATH/occ config:system:set mysql.utf8mb4 --type boolean --value="true"