echo-e"\nHack: restart everything to ensure that database and nextcloud are initialized"
docker-compose restart
printf"$(date): Waiting for Nextcloud to finish installation"
# sleep for 300 seconds
for i in{0..300};do
sleep 1
printf"."
done
# Create Nextcloud mysql database and user
docker-compose exec-T mariadb mysql --user=root --password="$MYSQL_ROOT_PASSWORD"\
-e"CREATE USER '$MYSQL_USER_NC'@'%' IDENTIFIED BY '$MYSQL_PASSWORD_NC';"
@@ -65,6 +75,8 @@ echo -e "\n\n\n"
echo-e"Please add the following records to your domain's DNS configuration:\n"
find /mnt/repo-base/volumes/mail/dkim/ -maxdepth 1 -mindepth 1 -type d | while read line;do DOMAIN=$(basename$line);echo" - DKIM record (TXT) for $DOMAIN:"&&cat$line/public.key;done