Don't delete old servers or clients.

The version number is in the file name, so when the version changes a new server and client will be downloaded anyway.
This commit is contained in:
Jason M. Wood 2014-11-29 22:06:33 -05:00
parent 4e919bdb7a
commit 4d4f4061fd

View File

@ -1230,7 +1230,7 @@ worldBackupRestore() {
# @param 1 The world to update.
# ---------------------------------------------------------------------------
updateClientSoftware() {
local CLIENT_DURATION CLIENT_JAR CLIENT_LOCATION CLIENT_URL
local CLIENT_JAR CLIENT_LOCATION CLIENT_URL
CLIENT_JAR=$(getClientJar "$1")
if [ $? -ne 0 ]; then
printf "$CLIENT_JAR\n"
@ -1248,12 +1248,6 @@ updateClientSoftware() {
fi
# Make sure the client software directory exists.
execute "mkdir -p $CLIENT_LOCATION" $USER_NAME
# The timeout (in minutes) for the client jar file.
CLIENT_DURATION=1440
# Delete the client jar file if it is old.
if [ -s "$CLIENT_LOCATION/$CLIENT_JAR" ]; then
execute "find $CLIENT_LOCATION/$CLIENT_JAR -mmin +$CLIENT_DURATION -delete" $USER_NAME
fi
# Download the client jar if it is missing.
if [ ! -s "$CLIENT_LOCATION/$CLIENT_JAR" ]; then
# Download the Minecraft client software.
@ -1272,7 +1266,7 @@ updateClientSoftware() {
# @param 1 The world server to update.
# ---------------------------------------------------------------------------
updateServerSoftware() {
local SERVER_DURATION SERVER_JAR SERVER_LOCATION SERVER_URL
local SERVER_JAR SERVER_LOCATION SERVER_URL
SERVER_JAR=$(getServerJar "$1")
if [ $? -ne 0 ]; then
printf "$SERVER_JAR\n"
@ -1290,12 +1284,6 @@ updateServerSoftware() {
fi
# Make sure the server software directory exists.
execute "mkdir -p $SERVER_LOCATION" $USER_NAME
# The timeout (in minutes) for the server jar file.
SERVER_DURATION=1440
# Delete the server jar file if it is old.
if [ -s "$SERVER_LOCATION/$SERVER_JAR" ]; then
execute "find $SERVER_LOCATION/$SERVER_JAR -mmin +$SERVER_DURATION -delete" $USER_NAME
fi
# Download the server jar if it is missing.
if [ ! -s "$SERVER_LOCATION/$SERVER_JAR" ]; then
# Download the Minecraft server software.