Просмотр исходного кода

moved port and server name to info_config.sh

Daniel Gibbs 9 лет назад
Родитель
Сommit
1f11921445
2 измененных файлов с 3 добавлено и 8 удалено
  1. 0 8
      Mumble/mumbleserver
  2. 3 0
      lgsm/functions/info_config.sh

+ 0 - 8
Mumble/mumbleserver

@@ -62,14 +62,6 @@ servercfgdir="${filesdir}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 backupdir="${rootdir}/backups"
 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
 # Logging
 logdays="7"
 logdays="7"
 gamelogdir="${rootdir}/log"
 gamelogdir="${rootdir}/log"

+ 3 - 0
lgsm/functions/info_config.sh

@@ -225,6 +225,7 @@ fn_info_config_mumble(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 	if [ ! -f "${servercfgfullpath}" ]; then
 		port="64738"
 		port="64738"
 		queryport="${port}"
 		queryport="${port}"
+		servername="Mumble"
 	else
 	else
 		# check if the ip exists in the config file. Failing this will fall back to the default.
 		# 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}')
 		ipconfigcheck=$(cat "${servercfgfullpath}" | grep "host=" | awk -F'=' '{ print $2}')
@@ -237,6 +238,8 @@ fn_info_config_mumble(){
 		# Not Set
 		# Not Set
 		port=${port:-"64738"}
 		port=${port:-"64738"}
 		queryport=${queryport:-"64738"}
 		queryport=${queryport:-"64738"}
+
+		servername="Mumble Port ${port}"
 	fi
 	fi
 }
 }