From 68cc00447c460da09a49f5ba6786aa84d893497e Mon Sep 17 00:00:00 2001 From: Moviuro Date: Sat, 6 Jun 2015 22:03:54 +0200 Subject: [PATCH 1/4] launch-dedicated.sh: Support passing args from CLI --- launch-dedicated.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/launch-dedicated.sh b/launch-dedicated.sh index c5dd5ab77b..110c19a5aa 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -1,12 +1,12 @@ #!/bin/sh # example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated for details -Name="Dedicated Server" -Mod="ra" +Name="${Name:-"Dedicated Server"}" +Mod="${Mod:-"ra"}" Dedicated="True" DedicatedLoop="True" -ListenPort=1234 -ExternalPort=1234 -AdvertiseOnline="False" +ListenPort="${ListenPort:-"1234"}" +ExternalPort="${ExternalPort:-"1234"}" +AdvertiseOnline="${AdvertiseOnline:-"False"}" while true; do mono --debug OpenRA.Game.exe Game.Mod=$Mod Server.Dedicated=$Dedicated Server.DedicatedLoop=$DedicatedLoop \ From e24b4dbd8ab5ad03a9987e591bdc3f9657d898e5 Mon Sep 17 00:00:00 2001 From: Moviuro Date: Sat, 13 Jun 2015 10:18:30 +0200 Subject: [PATCH 2/4] launch-dedicated.sh: add AllowPortForward directive --- launch-dedicated.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/launch-dedicated.sh b/launch-dedicated.sh index 110c19a5aa..a8fde06b15 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -7,9 +7,10 @@ DedicatedLoop="True" ListenPort="${ListenPort:-"1234"}" ExternalPort="${ExternalPort:-"1234"}" AdvertiseOnline="${AdvertiseOnline:-"False"}" +AllowPortForward="${AllowPortForward:-"False"}" while true; do mono --debug OpenRA.Game.exe Game.Mod=$Mod Server.Dedicated=$Dedicated Server.DedicatedLoop=$DedicatedLoop \ Server.Name="$Name" Server.ListenPort=$ListenPort Server.ExternalPort=$ExternalPort \ - Server.AdvertiseOnline=$AdvertiseOnline + Server.AdvertiseOnline=$AdvertiseOnline Server.AllowPortForward=$AllowPortForward done From 392cc90695cecc886b58286eb04f9d66c5500aa9 Mon Sep 17 00:00:00 2001 From: Moviuro Date: Sat, 13 Jun 2015 10:19:05 +0200 Subject: [PATCH 3/4] launch-dedicated.sh: Default to advertize Online --- launch-dedicated.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch-dedicated.sh b/launch-dedicated.sh index a8fde06b15..12d031e89d 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -6,7 +6,7 @@ Dedicated="True" DedicatedLoop="True" ListenPort="${ListenPort:-"1234"}" ExternalPort="${ExternalPort:-"1234"}" -AdvertiseOnline="${AdvertiseOnline:-"False"}" +AdvertiseOnline="${AdvertiseOnline:-"True"}" AllowPortForward="${AllowPortForward:-"False"}" while true; do From 9df6b3c15fac1390660517818c89406e496c5225 Mon Sep 17 00:00:00 2001 From: Moviuro Date: Sat, 13 Jun 2015 10:23:24 +0200 Subject: [PATCH 4/4] launch-dedicated.sh: add a tiny comment/usage --- launch-dedicated.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/launch-dedicated.sh b/launch-dedicated.sh index 12d031e89d..52505a9f67 100755 --- a/launch-dedicated.sh +++ b/launch-dedicated.sh @@ -1,5 +1,11 @@ #!/bin/sh # example launch script, see https://github.com/OpenRA/OpenRA/wiki/Dedicated for details + +# Usage: +# $ ./launch-dedicated.sh # Launch a dedicated server with default settings +# $ Mod="d2k" ./launch-dedicated.sh # Launch a dedicated server with default settings but override the Mod +# Read the file to see which settings you can override + Name="${Name:-"Dedicated Server"}" Mod="${Mod:-"ra"}" Dedicated="True"