mirror of
https://github.com/MinecraftServerControl/mscs.git
synced 2024-11-15 14:58:18 -07:00
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:
parent
4e919bdb7a
commit
4d4f4061fd
@ -1230,7 +1230,7 @@ worldBackupRestore() {
|
|||||||
# @param 1 The world to update.
|
# @param 1 The world to update.
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
updateClientSoftware() {
|
updateClientSoftware() {
|
||||||
local CLIENT_DURATION CLIENT_JAR CLIENT_LOCATION CLIENT_URL
|
local CLIENT_JAR CLIENT_LOCATION CLIENT_URL
|
||||||
CLIENT_JAR=$(getClientJar "$1")
|
CLIENT_JAR=$(getClientJar "$1")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printf "$CLIENT_JAR\n"
|
printf "$CLIENT_JAR\n"
|
||||||
@ -1248,12 +1248,6 @@ updateClientSoftware() {
|
|||||||
fi
|
fi
|
||||||
# Make sure the client software directory exists.
|
# Make sure the client software directory exists.
|
||||||
execute "mkdir -p $CLIENT_LOCATION" $USER_NAME
|
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.
|
# Download the client jar if it is missing.
|
||||||
if [ ! -s "$CLIENT_LOCATION/$CLIENT_JAR" ]; then
|
if [ ! -s "$CLIENT_LOCATION/$CLIENT_JAR" ]; then
|
||||||
# Download the Minecraft client software.
|
# Download the Minecraft client software.
|
||||||
@ -1272,7 +1266,7 @@ updateClientSoftware() {
|
|||||||
# @param 1 The world server to update.
|
# @param 1 The world server to update.
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
updateServerSoftware() {
|
updateServerSoftware() {
|
||||||
local SERVER_DURATION SERVER_JAR SERVER_LOCATION SERVER_URL
|
local SERVER_JAR SERVER_LOCATION SERVER_URL
|
||||||
SERVER_JAR=$(getServerJar "$1")
|
SERVER_JAR=$(getServerJar "$1")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printf "$SERVER_JAR\n"
|
printf "$SERVER_JAR\n"
|
||||||
@ -1290,12 +1284,6 @@ updateServerSoftware() {
|
|||||||
fi
|
fi
|
||||||
# Make sure the server software directory exists.
|
# Make sure the server software directory exists.
|
||||||
execute "mkdir -p $SERVER_LOCATION" $USER_NAME
|
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.
|
# Download the server jar if it is missing.
|
||||||
if [ ! -s "$SERVER_LOCATION/$SERVER_JAR" ]; then
|
if [ ! -s "$SERVER_LOCATION/$SERVER_JAR" ]; then
|
||||||
# Download the Minecraft server software.
|
# Download the Minecraft server software.
|
||||||
|
Loading…
Reference in New Issue
Block a user