summaryrefslogtreecommitdiff
path: root/.tools/jobs/initdb.sh
diff options
context:
space:
mode:
Diffstat (limited to '.tools/jobs/initdb.sh')
-rwxr-xr-x.tools/jobs/initdb.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/.tools/jobs/initdb.sh b/.tools/jobs/initdb.sh
new file mode 100755
index 000000000..d6c2480fb
--- /dev/null
+++ b/.tools/jobs/initdb.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+source ./.tools/scripts/init.sh
+
+cd ../server-data
+
+export host=$1
+cd sql-files
+
+export CMD="mysql --force -u root -proot --host=${host}"
+check_error $?
+echo $CMD <./initremote.sql
+$CMD <./initremote.sql
+check_error $?
+
+export CMD="mysql -u evol -pevol --host=${host} evol"
+echo Creating tables...
+echo $CMD <main.sql
+$CMD <main.sql
+check_error $?
+echo $CMD <logs.sql
+$CMD <logs.sql
+check_error $?