Changeset 67 for scripts/usr/local/lib/7dtd/monitor-log.sh
- Timestamp:
- Jul 10, 2014, 9:59:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/monitor-log.sh
r64 r67 2 2 3 3 . /usr/local/lib/7dtd/common.sh 4 . /usr/local/lib/7dtd/playerlog.sh 4 5 5 6 if [ $(isValidInstance $1) -eq 0 ]; then … … 9 10 10 11 INSTANCE=$1 11 LOG=$(getInstancePath $INSTANCE)/ output.log12 CHATLOG=$(getInstancePath $INSTANCE)/ chat.log12 LOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output.log 13 CHATLOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_chat.log 13 14 14 15 timestamp() { … … 49 50 } 50 51 52 if [ ! -d "$(getInstancePath $INSTANCE)/logs" ]; then 53 mkdir "$(getInstancePath $INSTANCE)/logs" 54 fi 55 56 setAllPlayersOffline 57 51 58 echo >> $LOG 52 59 echo >> $LOG … … 62 69 $NOBUF tr -d '\r' | 63 70 $NOBUF grep -v "^(Filename: " | 71 $NOBUF sed -r 's/^[0-9]+,[0-9]+ (.*)$/\1/' | 64 72 while read line ; do 65 73 if [ -n "$line" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.