Hi all,
I did a search but couldn't find anything so sorry if this has been asked before.
Is it possible to add a password to the dedicated server .sh script?
If so could someone give me the command(s) to add?
Thanks.
Adding a password to a dedicated server
#!/bin/bash
Name="xaionaro_hetzner_$2"
Mod="ra"
Dedicated="True"
DedicatedLoop="True"
ListenPort="$1"
ExternalPort="$1"
AdvertiseOnline="True"
Password="yourpassword"
#Map="ba403f6bcb4cae934335b78be42f714992b3a71a"
#Map="399372de425c9e8e9d49df90fbbc467dcfc52ac7"
# Haos Ridges
Map="3bc995f925d5b1a894513fb3e570ce22784adcf1"
while true; do
cd "/usr/local/openra/$2/current/usr/share/openra" 2>/dev/null ||
cd "/usr/local/openra/$2/current/usr/local/share/openra" 2>/dev/null ||
cd "/usr/local/openra/$2/current/usr/share/openra-bleed" 2>/dev/null ||
cd "/usr/local/openra/$2/current/usr/local/share/openra-bleed"
if [ "$2" = "release" ]; then
mono 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.Map=$Map Server.Password=$Password
else
mono 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.Map=$Map Server.Password=$Password
fi
done
Name="xaionaro_hetzner_$2"
Mod="ra"
Dedicated="True"
DedicatedLoop="True"
ListenPort="$1"
ExternalPort="$1"
AdvertiseOnline="True"
Password="yourpassword"
#Map="ba403f6bcb4cae934335b78be42f714992b3a71a"
#Map="399372de425c9e8e9d49df90fbbc467dcfc52ac7"
# Haos Ridges
Map="3bc995f925d5b1a894513fb3e570ce22784adcf1"
while true; do
cd "/usr/local/openra/$2/current/usr/share/openra" 2>/dev/null ||
cd "/usr/local/openra/$2/current/usr/local/share/openra" 2>/dev/null ||
cd "/usr/local/openra/$2/current/usr/share/openra-bleed" 2>/dev/null ||
cd "/usr/local/openra/$2/current/usr/local/share/openra-bleed"
if [ "$2" = "release" ]; then
mono 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.Map=$Map Server.Password=$Password
else
mono 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.Map=$Map Server.Password=$Password
fi
done