summaryrefslogtreecommitdiffstats
path: root/tests/testserver/common/startup.sh
blob: 97d48048abf115c14c206efb8b6b23a8b9a46fd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
# Copyright (C) 2018 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

set -ex

# export variables
export USER=qt-test-server
export PASS=password
export CONFIG=service/testdata
export TESTDATA=service/testdata

# add users
useradd -m -s /bin/bash $USER; echo "$USER:$PASS" | chpasswd

# install configurations and test data
su $USER -c "cp $CONFIG/system/passwords ~/"

./startup.sh "$@"