From 1f11921445c4f1bb7758e034697fc936493ea925 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 29 Jul 2016 23:11:37 +0100 Subject: [PATCH] moved port and server name to info_config.sh --- Mumble/mumbleserver | 8 -------- lgsm/functions/info_config.sh | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Mumble/mumbleserver b/Mumble/mumbleserver index d05305a0d..628a07ad4 100644 --- a/Mumble/mumbleserver +++ b/Mumble/mumbleserver @@ -62,14 +62,6 @@ servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" backupdir="${rootdir}/backups" -if [ -f "${servercfgfullpath}" ]; then - port=$(cat "${servercfgfullpath}" | grep 'port=' | awk -F'=' '{ print $2 }') - servername="Mumble Port ${port}" -else - port="UNKNOWN" - servername="Mumble" -fi - # Logging logdays="7" gamelogdir="${rootdir}/log" diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index 139dadc13..1f754d62d 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -225,6 +225,7 @@ fn_info_config_mumble(){ if [ ! -f "${servercfgfullpath}" ]; then port="64738" queryport="${port}" + servername="Mumble" else # check if the ip exists in the config file. Failing this will fall back to the default. ipconfigcheck=$(cat "${servercfgfullpath}" | grep "host=" | awk -F'=' '{ print $2}') @@ -237,6 +238,8 @@ fn_info_config_mumble(){ # Not Set port=${port:-"64738"} queryport=${queryport:-"64738"} + + servername="Mumble Port ${port}" fi }