forked from zuluhotelaustralia/zha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·37 lines (26 loc) · 842 Bytes
/
run.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
32
33
34
35
36
37
#!/bin/bash
set -e
if [ ! -d ../shard ]; then
echo "Missing shard storage in parent directory"
exit 1
fi
ln -s -f ../shard/realm .
ln -s -f ../shard/data .
if [ ! -d ./realm/britannia ]; then
echo "Generating realm files as they do not exist"
ln -s -f "$(pwd)/../shard/client" setup/uo-client
pushd setup; ./generate_data_files.sh; popd
echo "Storing realm cfg in custom config directory"
cp -f config/multis.cfg ../shard/config/
cp -f config/tiles.cfg ../shard/config/
cp -f config/landtiles.cfg ../shard/config/
fi
if [ -n "${SERVER_EXTERNAL_IP}" ]; then
sed -i "s/--ip--/$SERVER_EXTERNAL_IP/g" ./config/servers.cfg
echo "Server IP set to $SERVER_EXTERNAL_IP"
fi
if [ -d ../shard/config ]; then
echo "Copying custom configs"
cp -f ../shard/config/*.cfg ./config/
fi
exec ./pol