From 656f418224f1217200545f4e97d248a86ddbeda5 Mon Sep 17 00:00:00 2001
From: Tekaoh <45337851+Tekaoh@users.noreply.github.com>
Date: Wed, 2 Sep 2020 12:22:21 -0400
Subject: [PATCH] Download server settings from a web service before startup
---
.gitignore | 1 +
build.xml | 13 ++++++++++++-
startServer.sh | 7 +++++++
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index ee3f6c1..fa7cbf9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ miff/
.setup
local.properties
*.log
+webcfg.properties
diff --git a/build.xml b/build.xml
index 6f982dc..dd0cbe3 100755
--- a/build.xml
+++ b/build.xml
@@ -470,7 +470,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/startServer.sh b/startServer.sh
index d8c0d13..819c510 100755
--- a/startServer.sh
+++ b/startServer.sh
@@ -20,6 +20,13 @@ killall SwgDatabaseServer &> /dev/null
killall SwgGameServer &> /dev/null
killall TransferServer &> /dev/null
+if [[ -f webcfg.properties ]]; then
+ echo "Fetching your settings using the SWG Auth WebCFG API"
+ SERVERPATH=$(cat webcfg.properties | grep serverpath | sed 's/^.*= //')
+ FILEPATH=$(cat webcfg.properties | grep filepath | sed 's/^.*= //')
+ wget $SERVERPATH -O $FILEPATH
+fi
+
./bin/LoginServer -- @servercommon.cfg &
sleep 5