mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-18 18:56:19 +00:00
First commit
This commit is contained in:
commit
7b58f82156
21 changed files with 1951 additions and 0 deletions
24
build/run/bin/install-mariadb
Executable file
24
build/run/bin/install-mariadb
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
# Exit if any errors pop up
|
||||
set -e
|
||||
|
||||
# Install mariadb
|
||||
rm -r /var/lib/mysql/* -f
|
||||
mariadb-install-db --user=root --datadir=/var/lib/mysql/
|
||||
|
||||
# Wait for mariadb start
|
||||
mariadbd-safe --user=root --datadir=/var/lib/mysql/ &
|
||||
until mariadb --user=root --database=mysql -e "show tables;" >/dev/null
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Secure installation
|
||||
printf '%s\n' "" "n" "n" "" "" "" "" | mariadb-secure-installation
|
||||
|
||||
# Shutdown mariadb
|
||||
mariadb --user=root -e "shutdown;"
|
||||
until ! mariadb --user=root --database=mysql -e "show tables;" >/dev/null
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue