Changeset 219 for scripts/usr/local/lib/7dtd
- Timestamp:
- Dec 19, 2014, 6:51:16 PM (10 years ago)
- Location:
- scripts/usr/local/lib/7dtd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/VERSION
r217 r219 1 Version: 7 02 Release: 2014-12-1 83 DediBuild: 47 77151 Version: 71 2 Release: 2014-12-19 3 DediBuild: 478721 4 4 -
scripts/usr/local/lib/7dtd/commands/start.sh
r207 r219 36 36 done 37 37 38 LOG=$(getInstancePath $1)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output_log.txt 38 39 SSD_PID="--pidfile $(getInstancePath $1)/7dtd.pid --make-pidfile" 39 40 SSD_DAEMON="--background --no-close" 40 41 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" 42 43 43 44 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 … … 51 52 SSD_MONITOR_PID="--pidfile $(getInstancePath $1)/monitor.pid --make-pidfile" 52 53 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" 54 55 echo "Done!" 55 56 else -
scripts/usr/local/lib/7dtd/monitor-log.sh
r204 r219 10 10 11 11 INSTANCE=$1 12 LOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output.log 12 LOG=$2 13 #LOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_output_log.txt 13 14 CHATLOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_chat.log 14 15 COMMANDLOG=$(getInstancePath $INSTANCE)/logs/$(date '+%Y-%m-%d_%H-%M-%S')_commandExecution.log … … 85 86 echo >> $LOG 86 87 87 rm $(getInstancePath $INSTANCE)/logs/current_output .log88 rm $(getInstancePath $INSTANCE)/logs/current_output_log.txt 88 89 rm $(getInstancePath $INSTANCE)/logs/current_chat.log 89 90 rm $(getInstancePath $INSTANCE)/logs/current_commandExecution.log 90 ln -s $LOG $(getInstancePath $INSTANCE)/logs/current_output .log91 ln -s $LOG $(getInstancePath $INSTANCE)/logs/current_output_log.txt 91 92 ln -s $CHATLOG $(getInstancePath $INSTANCE)/logs/current_chat.log 92 93 ln -s $COMMANDLOG $(getInstancePath $INSTANCE)/logs/current_commandExecution.log … … 96 97 NOBUF="stdbuf -e0 -o0" 97 98 98 $NOBUF tail -n 5000 -F $(getInstancePath $INSTANCE)/logs/ output_log.txt|99 $NOBUF tail -n 5000 -F $(getInstancePath $INSTANCE)/logs/$LOG | 99 100 $NOBUF tr '\\' '/' | 100 101 $NOBUF tr -d '\r' | 101 102 $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/' | 103 104 while read line ; do 104 105 if [ -n "$line" ]; then 105 echo "$(timestamp): $line" >> $LOG106 106 #Player connected, clientid=[0-9]*, entityid=[0-9]*, name=.*, steamid=[0-9]*, ip=[0-9.]*$ 107 107 if [ -n "$(echo "$line" | grep '^Player connected,')" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.