Browse Source

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

fixed #957
feature/alerts-refactor
Daniel Gibbs 4 years ago
parent
commit
7dabcc95ca
No known key found for this signature in database GPG Key ID: 2EBB36015C6D78E2
  1. 4
      lgsm/functions/info_messages.sh

4
lgsm/functions/info_messages.sh

@ -749,13 +749,13 @@ fn_info_logs(){
fi fi
if [ -n "${gamelogdir}" ]; then if [ -n "${gamelogdir}" ]; then
echo -e "\nServer log\n===================" echo -e "\nGame Server log\n==================="
if [ ! "$(ls -A "${gamelogdir}")" ]; then if [ ! "$(ls -A "${gamelogdir}")" ]; then
echo -e "${gamelogdir} (NO LOG FILES)" echo -e "${gamelogdir} (NO LOG FILES)"
else else
echo -e "${gamelogdir}" echo -e "${gamelogdir}"
# dos2unix sed 's/\r//' # 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
fi fi
} }

Loading…
Cancel
Save