Daniel Gibbs %!s(int64=8) %!d(string=hai) anos
pai
achega
3300ddc3e9

+ 2 - 2
lgsm/functions/update_minecraft.sh

@@ -47,7 +47,7 @@ fn_update_currentbuild(){
 	fi
 
 	# Get current build from logs
-	currentbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
+	currentbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
 	if [ -z "${currentbuild}" ]; then
 		fn_print_error_nl "Checking for update: mojang.com: Current build version not found"
 		fn_script_log_error "Checking for update: mojang.com: Current build version not found"
@@ -58,7 +58,7 @@ fn_update_currentbuild(){
 		command_stop.sh
 		exitbypass=1
 		command_start.sh
-		currentbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
+		currentbuild=$(cat "${serverfiles}/logs/latest.log" 2> /dev/null | grep version | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
 		if [ -z "${currentbuild}" ]; then
 			fn_print_fail_nl "Checking for update: mojang.com: Current build version still not found"
 			fn_script_log_fatal "Checking for update: mojang.com: Current build version still not found"

+ 2 - 2
lgsm/functions/update_mumble.sh

@@ -49,7 +49,7 @@ fn_update_mumble_currentbuild(){
 	fi
 
 	# Get current build from logs
-	currentbuild=$(cat "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null | sort | egrep 'Murmur ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | awk '{print $4}')
+	currentbuild=$(cat "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null | sort | grep -E 'Murmur ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | awk '{print $4}')
 	if [ -z "${currentbuild}" ]; then
 		fn_print_error_nl "Checking for update: GitHub: Current build version not found"
 		fn_script_log_error "Checking for update: GitHub: Current build version not found"
@@ -60,7 +60,7 @@ fn_update_mumble_currentbuild(){
 		command_stop.sh
 		exitbypass=1
 		command_start.sh
-		currentbuild=$(cat "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null | sort | egrep 'Murmur ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | awk '{print $4}')
+		currentbuild=$(cat "${consolelogdir}"/"${servicename}"-console.log 2> /dev/null | sort | grep -E 'Murmur ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | awk '{print $4}')
 		if [ -z "${currentbuild}" ]; then
 			fn_print_fail_nl "Checking for update: GitHub: Current build version still not found"
 			fn_script_log_fatal "Checking for update: GitHub: Current build version still not found"

+ 3 - 3
lgsm/functions/update_ts3.sh

@@ -48,7 +48,7 @@ fn_update_ts3_currentbuild(){
 	fi
 
 	# Get current build from logs
-	currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | sort -V | tail -1)
+	currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | grep -Ev '${rootdir}/.ts3version' | tail -1) | grep -Eo 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | sort -V | tail -1)
 	if [ -z "${currentbuild}" ]; then
 		fn_print_error_nl "Checking for update: teamspeak.com: Current build version not found"
 		fn_script_log_error "Checking for update: teamspeak.com: Current build version not found"
@@ -59,7 +59,7 @@ fn_update_ts3_currentbuild(){
 		command_stop.sh
 		exitbypass=1
 		command_start.sh
-		currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | egrep -E -v '${rootdir}/.ts3version' | tail -1) | egrep -o 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | egrep -o '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
+		currentbuild=$(cat $(find ./* -name 'ts3server*_0.log' 2> /dev/null | sort | grep -Ev '${rootdir}/.ts3version' | tail -1) | grep -Eo 'TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}' | grep -Eo '((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}')
 		if [ -z "${currentbuild}" ]; then
 			fn_print_fail_nl "Checking for update: teamspeak.com: Current build version still not found"
 			fn_script_log_fatal "Checking for update: teamspeak.com: Current build version still not found"
@@ -112,7 +112,7 @@ fn_update_ts3_availablebuild_legacy(){
 	# Gets latest build info.
 
 	# Grabs all version numbers but not in correct order.
-	wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '<a href=\".*\/\">.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > "${tmpdir}/.ts3_version_numbers_unsorted.tmp"
+	wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | grep -Eo '<a href=\".*\/\">.*\/<\/a>' | grep -Eo '[0-9\.?]+'|uniq > "${tmpdir}/.ts3_version_numbers_unsorted.tmp"
 
 	# Sort version numbers
 	cat "${tmpdir}/.ts3_version_numbers_unsorted.tmp" | sort -r --version-sort -o "${tmpdir}/.ts3_version_numbers_sorted.tmp"