From 6438fff13a71973d67addcc53d55d2cc716af0e9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 17 Mar 2018 00:49:53 +0000 Subject: [PATCH] SC2143 --- lgsm/functions/install_config.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 00fdd5431..190afbcd3 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -61,8 +61,7 @@ fn_set_config_vars(){ echo "changing hostname." fn_script_log_info "changing hostname." sleep 1 - - if [ "$(grep SERVERNAME=SERVERNAME \"${lgsmdir}/config-default/config-game/${config}\" 2>/dev/null)" ]; then + if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2>/dev/null; then sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g" "${servercfgfullpath}" else sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}"