Changeset 248 for scripts/usr/local


Ignore:
Timestamp:
Jul 26, 2015, 5:20:54 PM (9 years ago)
Author:
alloc
Message:

Scripts

Location:
scripts/usr/local/lib/7dtd
Files:
1 added
6 edited

Legend:

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

    r242 r248  
    1 Version: 93
    2 Release: 2015-07-06
    3 DediBuild: 682942
     1Version: 94
     2Release: 2015-07-26
    43
  • scripts/usr/local/lib/7dtd/commands/instances.sh

    r90 r248  
    99                if [ $(isRunning $I) -eq 1 ]; then
    1010                        run="yes"
    11                         cur=$(telnetCommand $I lp | grep -E "^\s?Total of " | cut -d\  -f 3)
     11                        cur=$(telnetCommand $I lp | grep -aE "^\s?Total of " | cut -d\  -f 3)
    1212                else
    1313                        run="no"
  • scripts/usr/local/lib/7dtd/commands/status.sh

    r90 r248  
    2020                echo "Open ports:"
    2121                netstat -nlp | grep $(getInstancePID $1) | sed -r 's/^([^ ]*)\s+.*[^ :]*:([^ ]*).*[^ :]*:[^ ]*.*/    \2 (\1)/g' | sort
    22                 cur=$(telnetCommand $1 lp | grep -E "^\s?Total of " | cut -d\  -f 3)
     22                cur=$(telnetCommand $1 lp | grep -aE "^\s?Total of " | cut -d\  -f 3)
    2323                echo "Players: $cur"
    2424        else
  • scripts/usr/local/lib/7dtd/commands/stop.sh

    r204 r248  
    4545                if [ $(isRunning $1) -eq 1 ]; then
    4646                        echo "Failed, force closing server..."
    47                         $SSD --stop --pidfile $(getInstancePath $1)/7dtd.pid
     47                        $SSD --stop --signal KILL --pidfile $(getInstancePath $1)/7dtd.pid
    4848                fi
    4949
  • scripts/usr/local/lib/7dtd/commands/updateengine.sh

    r239 r248  
    44
    55sdtdCommandUpdateengine() {
    6         local FORCED=no
    7         local CHECKONLY=no
    8         if [ "$1" = "--force" ]; then
    9                 FORCED=yes
    10         fi
     6#       local FORCED=no
     7#       if [ "$1" = "--force" ]; then
     8#               FORCED=yes
     9#       fi
    1110
    1211        if [ ! -e $SDTD_BASE/steamcmd ]; then
     
    1918        fi
    2019
    21         if [ "$1" = "--check" -o "$2" = "--check" ]; then
    22                 local LOCAL=$(getLocalEngineVersion)
    23                 local REMOTE=$(getRemoteEngineVersion)
    24                 if [ $REMOTE -gt $LOCAL ]; then
    25                         echo "Newer engine version available."
    26                 else
    27                         echo "Engine up to date."
    28                 fi
    29                 echo "Local buildid:     $LOCAL"
    30                 echo "Available buildid: $REMOTE"
    31                 return
    32         fi
     20#       if [ "$1" = "--check" -o "$2" = "--check" ]; then
     21#               local LOCAL=$(getLocalEngineVersion)
     22#               local REMOTE=$(getRemoteEngineVersion)
     23#               if [ $REMOTE -gt $LOCAL ]; then
     24#                       echo "Newer engine version available."
     25#               else
     26#                       echo "Engine up to date."
     27#               fi
     28#               echo "Local buildid:     $LOCAL"
     29#               echo "Available buildid: $REMOTE"
     30#               return
     31#       fi
    3332
    3433        for I in $(getInstanceList); do
     
    4241        local LOCAL=$(getLocalEngineVersion)
    4342        #local REMOTE=$(getRemoteEngineVersion)
    44         local LOCAL_SUPPORTED_BUILD=$(cat /usr/local/lib/7dtd/VERSION | grep "DediBuild" | cut -d\  -f2)
     43        #local LOCAL_SUPPORTED_BUILD=$(cat /usr/local/lib/7dtd/VERSION | grep "DediBuild" | cut -d\  -f2)
    4544
    4645#       if [ "$FORCED" = "yes" -o $REMOTE -gt $LOCAL ]; then
     
    5150
    5251#               if [ "$LOCAL_SUPPORTED_BUILD" != "$REMOTE" ]; then
    53                         echo "WARNING!!! The currently installed version of the scripts might not support the newer dedicated server build!"
    54                         echo "If you continue you might not be able to start the server."
     52#                       echo "WARNING!!! The currently installed version of the scripts might not support the newer dedicated server build!"
     53#                       echo "If you continue you might not be able to start the server."
    5554#                       echo "Please wait for an updated release of the scripts or continue at your own risk."
    56                         echo
     55#                       echo
    5756#               fi
    5857       
     
    8584                ./steamcmd.sh +login $STEAM_USER $STEAM_PASS +force_install_dir $SDTD_BASE/engine +app_update 294420 validate +quit
    8685
     86                if [ -d /usr/local/lib/7dtd/server-fixes ]; then
    8787                cp /usr/local/lib/7dtd/server-fixes/* $SDTD_BASE/engine/ -R
     88                fi
    8889
    8990                chown $SDTD_USER.$SDTD_GROUP -R $SDTD_BASE/engine
    9091
    91                 if [ "$LOCAL_SUPPORTED_BUILD" != "$REMOTE" ]; then
    92                         echo
    93                         echo "Also update the scripts as soon as there is a new release for this dedicated server build."
    94                         echo
    95                 fi
     92#               if [ "$LOCAL_SUPPORTED_BUILD" != "$REMOTE" ]; then
     93#                       echo
     94#                       echo "Also update the scripts as soon as there is a new release for this dedicated server build."
     95#                       echo
     96#               fi
    9697#       else
    9798#               echo "Engine is already at the newest build (local: $LOCAL, remote: $REMOTE)."
  • scripts/usr/local/lib/7dtd/commands/updatescripts.sh

    r225 r248  
    88       
    99        local LOCAL_BUILD=$(getLocalEngineVersion)
    10         local LOCAL_SUPPORTED_BUILD=$(cat /usr/local/lib/7dtd/VERSION | grep "DediBuild" | cut -d\  -f2)
    11         local REMOTE_SUPPORTED_BUILD=$(wget -qO- http://illy.bz/fi/7dtd/VERSION | grep "DediBuild" | cut -d\  -f2)
    1210       
    1311        local FORCED
     
    1917        if [ "$FORCED" = "yes" -o $REMOTE -gt $LOCAL ]; then
    2018                echo "A newer version of the scripts is available."
    21                 echo "Local:     v.$LOCAL (supported dedi build: $LOCAL_SUPPORTED_BUILD)"
    22                 echo "Available: v.$REMOTE (supported dedi build: $REMOTE_SUPPORTED_BUILD)"
     19                echo "Local:     v.$LOCAL"
     20                echo "Available: v.$REMOTE"
    2321                echo
    2422                echo "Please check the release notes before continuing:"
    2523                echo "  https://7dtd.illy.bz/wiki/Release%20Notes"
    2624                echo
    27                
    28                 if [ "$LOCAL_BUILD" != "$REMOTE_SUPPORTED_BUILD" ]; then
    29                         echo "NOTE: The newer scripts are made for a more recent build ($REMOTE_SUPPORTED_BUILD) of the dedicated server than you are running ($LOCAL_BUILD)!"
    30                         echo "You will have to update the engine after updating to those new scripts!"
    31                         echo
    32                 fi
    3325               
    3426                while : ; do
     
    6254                chmod 0755 /usr/local/lib/7dtd -R
    6355               
    64                 if [ -e $SDTD_BASE/engine/7DaysToDie_Data/Managed ]; then
    65                         cp /usr/local/lib/7dtd/server-fixes/* $SDTD_BASE/engine/ -R
    66                         chown $SDTD_USER.$SDTD_GROUP -R $SDTD_BASE/engine/
     56                if [ -d $SDTD_BASE/engine ]; then
     57                        if [ -d /usr/local/lib/7dtd/server-fixes ]; then
     58                                cp /usr/local/lib/7dtd/server-fixes/* $SDTD_BASE/engine/ -R
     59                                chown $SDTD_USER.$SDTD_GROUP -R $SDTD_BASE/engine/
     60                        fi
    6761                fi
    6862
     
    7367                echo "were new files added to the user folder /home/sdtd those changes"
    7468                echo "have not been applied!"
    75 
    76                 if [ "$LOCAL_BUILD" != "$REMOTE_SUPPORTED_BUILD" ]; then
    77                         echo
    78                         echo "Please do now update the engine by running '7dtd.sh updateengine'"
    79                 fi
    8069        else
    8170                echo "Scripts are already at the newest version (v.$LOCAL)."
Note: See TracChangeset for help on using the changeset viewer.