From 859567e1822d798db91dc3485896d963b2b7beb9 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 12 Mar 2022 16:02:48 +0530 Subject: [PATCH] DnsServiceWorker: Updated code to read optional config folder path to allow running multiple instances of the DNS server. --- DnsServerWindowsService/DnsServiceWorker.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/DnsServerWindowsService/DnsServiceWorker.cs b/DnsServerWindowsService/DnsServiceWorker.cs index a0a4c767..c43a7c6c 100644 --- a/DnsServerWindowsService/DnsServiceWorker.cs +++ b/DnsServerWindowsService/DnsServiceWorker.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2021 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2022 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,7 +33,13 @@ namespace DnsServerWindowsService public DnsServiceWorker() { - _service = new DnsWebService(null, new Uri("https://go.technitium.com/?id=43"), new Uri("https://go.technitium.com/?id=40")); + string configFolder = null; + + string[] args = Environment.GetCommandLineArgs(); + if (args.Length == 2) + configFolder = args[1]; + + _service = new DnsWebService(configFolder, new Uri("https://go.technitium.com/?id=43"), new Uri("https://server1.home.zare.im/files/apps/apps.json")); } public override Task StartAsync(CancellationToken cancellationToken)