blob: 1aa3592387a8a4294ed92c796c05f9e8784f722c (
plain) (
blame)
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
|
config_bwSuite_server() {
# $1: Path to server directory
echo -n "# Writing configuration for bwSuite server..."
echo "vmstore.path = /srv/openslx/nfs" > "$1/config.properties"
echo "db.uri = jdbc:mysql://localhost/bwLehrpool?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&characterSetResults=utf8&connectionCollation=utf8mb4_unicode_ci" >> "$1/config.properties"
echo "db.username = bwLehrpool" >> "$1/config.properties"
echo "db.password = %MYSQL_BWLEHRPOOL_PASS%" >> "$1/config.properties"
chown root:dmsd "$1/config.properties"
chmod 0640 "$1/config.properties"
echo "ok."
}
install_bwSuite_server() {
# $1: directory to install server to
echo -n "# Installing server part of bwSuite... "
mkdir -p "$1" 2>/dev/null
mkdir -p "$1/flag"
cp -p "$BASEDIR/static_files/dmsd/dmsd.sh" "$1"
cp -p "$BASEDIR/static_files/dmsd/control.sh" "$1"
cp -p "$BASEDIR/static_files/bwLehrpoolSuite_Server.jar" "$1/bwLehrpoolSuite_Server.jar"
chown -R root:root "$1"
chmod -R go-w "$1"
touch "$1/flag/run" # Set run flag right from the start
chown -R dmsd: "$1/flag"
echo "ok."
config_bwSuite_server "$1"
}
|