fix(alert): game server log must be a .log file

fixed #957
This commit is contained in:
Daniel Gibbs 2021-10-17 17:16:26 +01:00
parent d334d3c06e
commit 7dabcc95ca
No known key found for this signature in database
GPG Key ID: 2EBB36015C6D78E2

View File

@ -749,13 +749,13 @@ fn_info_logs(){
fi
if [ -n "${gamelogdir}" ]; then
echo -e "\nServer log\n==================="
echo -e "\nGame Server log\n==================="
if [ ! "$(ls -A "${gamelogdir}")" ]; then
echo -e "${gamelogdir} (NO LOG FILES)"
else
echo -e "${gamelogdir}"
# dos2unix sed 's/\r//'
tail "${gamelogdir}"/* 2>/dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25
tail "${gamelogdir}"/*.log* 2>/dev/null | grep -v "==>" | sed '/^$/d' | sed 's/\r//' | tail -25
fi
fi
}