From 93f31b254686e4cd6d1f1c699223a31de8d693c8 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 14 May 2017 23:04:30 +0100 Subject: [PATCH] Added details for ut3 --- lgsm/functions/info_config.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 18f772050..22b7520af 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -608,7 +608,17 @@ fn_info_config_unreal(){ } fn_info_config_unreal3(){ - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + webadminpass="${unavailable}" + else + servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + webadminpass=$(grep grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + + # Not Set + servername=${servername:-"NOT SET"} + webadminpass=${webadminpass:-"NOT SET"} + fi } fn_info_config_sdtd(){