Skip to content

Commit

Permalink
More hostname updating.
Browse files Browse the repository at this point in the history
  • Loading branch information
TLeonardUK committed Jun 3, 2022
1 parent 566191f commit 4f3c12e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,21 @@ jobs:
path: ./linux.zip
name: linux

build-docker:
name: Build Docker
runs-on: ubuntu-latest

steps:
- name: Checkout respository
uses: actions/checkout@v2
with:
submodules: recursive

- name: Generate Solution
shell: bash
working-directory: ${{github.workspace}}/Tools
run: ${{github.workspace}}/Tools/generate_make_release.sh

- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand All @@ -141,10 +156,10 @@ jobs:
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ds3os:latest

make-release:
name: Make Release
needs: [ build-windows, build-linux ]
needs: [ build-windows, build-linux, build-docker ]
runs-on: ubuntu-latest

steps:
Expand Down
5 changes: 5 additions & 0 deletions Source/Loader/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ private void OnLoaded(object sender, EventArgs e)
minimumPlayersBox.Value = ProgramSettings.Default.minimum_players;
ServerConfigList.FromJson(ProgramSettings.Default.server_config_json, out ServerList);

if (ProgramSettings.Default.master_server_url == "timleonard.uk")
{
ProgramSettings.Default.master_server_url = "ds3os-master.timleonard.uk";
}

// Strip out any old config files downloaded from the server, we will be querying them
// shortly anyway.
foreach (ServerConfig Config in ServerList.Servers.ToArray())
Expand Down
6 changes: 6 additions & 0 deletions Source/Server/Server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ bool Server::Init()
}
}

// Patch old server ip.
if (Config.MasterServerIp == "timleonard.uk")
{
Config.MasterServerIp = "ds3os-master.timleonard.uk";
}

// Generate server encryption keypair if it doesn't already exists.
if (!std::filesystem::exists(PrivateKeyPath) ||
!std::filesystem::exists(PublicKeyPath))
Expand Down

0 comments on commit 4f3c12e

Please sign in to comment.