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

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

Location:
scripts/usr/local/lib/7dtd/commands
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/usr/local/lib/7dtd/commands/backup.sh

    r61 r67  
    99        if [ ! -d "$SDTD_BASE/instances" ]; then
    1010                return
     11        fi
     12
     13        if [ "$SDTD_BACKUP_SAVEWORLD" == "true" ]; then
     14                for I in $(getInstanceList); do
     15                        if [ $(isRunning $I) -eq 1 ]; then
     16                                telnetCommand $I saveworld 2
     17                        fi
     18                done
    1119        fi
    1220
  • scripts/usr/local/lib/7dtd/commands/start.sh

    r66 r67  
    2626                fi
    2727               
    28                 setAllPlayersOffline $1
    29                 rm -f $(getInstancePath $1)/output_log.txt
     28                if [ ! -d "$(getInstancePath $1)/logs" ]; then
     29                        mkdir "$(getInstancePath $1)/logs"
     30                fi
     31                rm -f $(getInstancePath $1)/logs/output_log.txt
    3032               
    3133                for H in $(getHooksFor serverPreStart); do
     
    3638                SSD_DAEMON="--background --no-close"
    3739                SSD_USER="--chuid $SDTD_USER:$SDTD_GROUP --user $SDTD_USER"
    38                 OPTS="-logfile $(getInstancePath $1)/output_log.txt -configfile=$(getInstancePath $1)/config.xml -dedicated"
     40                OPTS="-logfile $(getInstancePath $1)/logs/output_log.txt -configfile=$(getInstancePath $1)/config.xml -dedicated"
    3941               
    40                 LD_LIBRARY_PATH=$SDTD_BASE/linux_files $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDie.x86 -- $OPTS > $(getInstancePath $1)/stdout.log 2>&1
     42                LD_LIBRARY_PATH=$SDTD_BASE/linux_files $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
    4143                sleep 1
    4244
Note: See TracChangeset for help on using the changeset viewer.