Ignore:
Timestamp:
Dec 19, 2014, 6:51:16 PM (10 years ago)
Author:
alloc
Message:

scripts 71

Location:
scripts/usr/local/lib/7dtd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • scripts/usr/local/lib/7dtd/VERSION

    r217 r219  
    1 Version: 70
    2 Release: 2014-12-18
    3 DediBuild: 477715
     1Version: 71
     2Release: 2014-12-19
     3DediBuild: 478721
    44
  • scripts/usr/local/lib/7dtd/commands/start.sh

    r207 r219  
    3636                done
    3737
     38                LOG=$(getInstancePath $1)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output_log.txt
    3839                SSD_PID="--pidfile $(getInstancePath $1)/7dtd.pid --make-pidfile"
    3940                SSD_DAEMON="--background --no-close"
    4041                SSD_USER="--chuid $SDTD_USER:$SDTD_GROUP --user $SDTD_USER"
    41                 OPTS="-logfile $(getInstancePath $1)/logs/output_log.txt -configfile=$(getInstancePath $1)/config.xml"
     42                OPTS="-logfile $LOG -configfile=$(getInstancePath $1)/config.xml"
    4243               
    4344                LC_ALL=C LD_LIBRARY_PATH=$SDTD_BASE/engine $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDie.x86 -- $OPTS > $(getInstancePath $1)/logs/stdout.log 2>&1
     
    5152                        SSD_MONITOR_PID="--pidfile $(getInstancePath $1)/monitor.pid --make-pidfile"
    5253                        SSD_MONITOR_DAEMON="--background"
    53                         $SSD --start $SSD_MONITOR_PID $SSD_MONITOR_DAEMON --exec "/usr/local/lib/7dtd/monitor-log.sh" -- "$1"
     54                        $SSD --start $SSD_MONITOR_PID $SSD_MONITOR_DAEMON --exec "/usr/local/lib/7dtd/monitor-log.sh" -- "$1" "$LOG"
    5455                        echo "Done!"
    5556                else
  • scripts/usr/local/lib/7dtd/monitor-log.sh

    r204 r219  
    1010
    1111INSTANCE=$1
    12 LOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output.log
     12LOG=$2
     13#LOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output_log.txt
    1314CHATLOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_chat.log
    1415COMMANDLOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_commandExecution.log
     
    8586echo >> $LOG
    8687
    87 rm $(getInstancePath $INSTANCE)/logs/current_output.log
     88rm $(getInstancePath $INSTANCE)/logs/current_output_log.txt
    8889rm $(getInstancePath $INSTANCE)/logs/current_chat.log
    8990rm $(getInstancePath $INSTANCE)/logs/current_commandExecution.log
    90 ln -s $LOG $(getInstancePath $INSTANCE)/logs/current_output.log
     91ln -s $LOG $(getInstancePath $INSTANCE)/logs/current_output_log.txt
    9192ln -s $CHATLOG $(getInstancePath $INSTANCE)/logs/current_chat.log
    9293ln -s $COMMANDLOG $(getInstancePath $INSTANCE)/logs/current_commandExecution.log
     
    9697NOBUF="stdbuf -e0 -o0"
    9798
    98 $NOBUF tail -n 5000 -F $(getInstancePath $INSTANCE)/logs/output_log.txt |
     99$NOBUF tail -n 5000 -F $(getInstancePath $INSTANCE)/logs/$LOG |
    99100$NOBUF tr '\\' '/' |
    100101$NOBUF tr -d '\r' |
    101102$NOBUF grep -v "^(Filename: " |
    102 $NOBUF sed -r 's/^[0-9]+-[0-9]+-[0-9]+T[0-9]+:[0-9]+:[0-9]+ [0-9]+[.,][0-9]+ (.*)$/\1/' |
     103$NOBUF sed -r 's/^[0-9]+-[0-9]+-[0-9]+T[0-9]+:[0-9]+:[0-9]+ [0-9]+[.,][0-9]+ [A-Z]+ (.*)$/\1/' |
    103104while read line ; do
    104105        if [ -n "$line" ]; then
    105                 echo "$(timestamp): $line" >> $LOG
    106106                #Player connected, clientid=[0-9]*, entityid=[0-9]*, name=.*, steamid=[0-9]*, ip=[0-9.]*$
    107107                if [ -n "$(echo "$line" | grep '^Player connected,')" ]; then
Note: See TracChangeset for help on using the changeset viewer.