Ignore:
Timestamp:
Jul 10, 2014, 9:59:02 PM (10 years ago)
Author:
alloc
Message:

v25: Fixes #22, #23. Also adds new serverconfig options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/usr/local/lib/7dtd/monitor-log.sh

    r64 r67  
    22
    33. /usr/local/lib/7dtd/common.sh
     4. /usr/local/lib/7dtd/playerlog.sh
    45
    56if [ $(isValidInstance $1) -eq 0 ]; then
     
    910
    1011INSTANCE=$1
    11 LOG=$(getInstancePath $INSTANCE)/output.log
    12 CHATLOG=$(getInstancePath $INSTANCE)/chat.log
     12LOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output.log
     13CHATLOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_chat.log
    1314
    1415timestamp() {
     
    4950}
    5051
     52if [ ! -d "$(getInstancePath $INSTANCE)/logs" ]; then
     53        mkdir "$(getInstancePath $INSTANCE)/logs"
     54fi
     55
     56setAllPlayersOffline
     57
    5158echo >> $LOG
    5259echo >> $LOG
     
    6269$NOBUF tr -d '\r' |
    6370$NOBUF grep -v "^(Filename: " |
     71$NOBUF sed -r 's/^[0-9]+,[0-9]+ (.*)$/\1/' |
    6472while read line ; do
    6573        if [ -n "$line" ]; then
Note: See TracChangeset for help on using the changeset viewer.