-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.sh
executable file
·31 lines (24 loc) · 877 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/bash
# Script to test the initalsync on a docker image (debian jessie).
# Copyright: Sandro Knauß <[email protected]>
# License: GPL-2+
# Date: 2015-12-02
set -e
set -x
# Use same graphics system as host, since we'll share the X11 socket
export QT_GRAPHICSSYSTEM=native
export QT_X11_NO_MITSHM=1
# Give access to graphics card. Alternatively add user to group video
sudo setfacl -m user:developer:rw /dev/dri/card0
# Disable KCrash, so we can get a backtrace using gdb
export KDE_DEBUG=1
USER=doe
PASSWORD=Welcome2KolabSystems
sudo /usr/sbin/mysqld& >/tmp/mysql.log 2>/tmp/mysql.err
sleep 2
sudo mysql --defaults-extra-file=/etc/mysql/debian.cnf <<EOF
CREATE DATABASE $USER;
GRANT ALL ON $USER.* TO '$USER'@localhost IDENTIFIED BY '$PASSWORD';
FLUSH PRIVILEGES;
EOF
./initalsync.py "John Doe" "[email protected]" "$USER" "$PASSWORD" "akonadi_kolab_resource_0"