adsf
This commit is contained in:
@@ -101,48 +101,21 @@ load_stock_map_data() {
|
||||
|
||||
refresh_local_cache() {
|
||||
msg "Refreshing local stock server cache"
|
||||
if ! islocked_remote_server ; then
|
||||
do_sync "$REMOTE_STOCK_SERVER"/ "$STOCK_SERVER_CACHE" || die "Failed to copy remote stock server data to local cache"
|
||||
else
|
||||
msg "Remote server is locked, sleeping..."
|
||||
while islocked_remote_server ; do
|
||||
sleep 15
|
||||
echo 'Sleeping...'
|
||||
done
|
||||
do_sync "$REMOTE_STOCK_SERVER"/ "$STOCK_SERVER_CACHE" || die "Failed to copy remote stock server data to local cache"
|
||||
fi
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_STOCK_SERVER"/ "$STOCK_SERVER_CACHE" || \
|
||||
die "Failed to copy remote stock server data to local cache"
|
||||
msg "Sucessfully copied stock server data into local cache"
|
||||
|
||||
# -------------------------------------
|
||||
|
||||
msg "Refreshing local map data cache for: $MAP_FOLDER_NAME"
|
||||
if ! islocked_remote_server ; then
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_MAPS/$MAP_FOLDER_NAME"/ "$LOCAL_DAYZ_FILES/stock/maps/$MAP_FOLDER_NAME" || \
|
||||
die "Failed to copy remote stock map data for: $MAP_FOLDER_NAME"
|
||||
else
|
||||
msg "Remote server is locked, sleeping..."
|
||||
while islocked_remote_server ; do
|
||||
sleep 15
|
||||
echo 'Sleeping...'
|
||||
done
|
||||
do_sync "$REMOTE_MAPS/$MAP_FOLDER_NAME"/ "$LOCAL_DAYZ_FILES/stock/maps/$MAP_FOLDER_NAME" || \
|
||||
die "Failed to copy remote stock map data for: $MAP_FOLDER_NAME"
|
||||
fi
|
||||
msg "Successfully copied stock map data for: $MAP_FOLDER_NAME"
|
||||
|
||||
# -------------------------------------
|
||||
|
||||
msg "Refreshing local mods cache"
|
||||
if ! islocked_remote_server ; then
|
||||
do_sync "$REMOTE_MODS"/ "$MOD_CACHE" || die "Failed to copy remote mods to local cache"
|
||||
else
|
||||
msg "Remote server is locked, sleeping..."
|
||||
while islocked_remote_server ; do
|
||||
sleep 15
|
||||
echo 'Sleeping...'
|
||||
done
|
||||
do_sync "$REMOTE_MODS"/ "$MOD_CACHE" || die "Failed to copy remote mods to local cache"
|
||||
fi
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_MODS"/ "$MOD_CACHE" || \
|
||||
die "Failed to copy remote mods to local cache"
|
||||
msg "Successfully copied remote mods into local cache"
|
||||
}
|
||||
|
||||
@@ -167,7 +140,9 @@ setup_environment() {
|
||||
do_sync "$MOD_CACHE/$MAP_FOLDER_NAME"/ "$SERVER_HOME/mods" || die "Failed to copy mods to $SERVER_HOME"
|
||||
|
||||
msg "Copying DZSA executable"
|
||||
do_sync "$REMOTE_DIR/res/software/DZSALModServer.exe" "$SERVER_HOME"/ || die "Failed to copy DZSALModServer.exe"
|
||||
wait_until_remote_server_unlocked
|
||||
do_sync "$REMOTE_DIR/res/software/DZSALModServer.exe" "$SERVER_HOME"/ || \
|
||||
die "Failed to copy DZSALModServer.exe"
|
||||
}
|
||||
|
||||
# finds list of mods to load and stores them in .modstring file
|
||||
@@ -256,7 +231,6 @@ EOF
|
||||
msg "TIME LEFT BEFORE RESTART: $(( (RESTART_INTERVAL - count) / 60 )) minutes"
|
||||
done
|
||||
|
||||
echo "==========================="
|
||||
msg "Time up - Killing server"
|
||||
cmd.exe /C taskkill /FI "WINDOWTITLE eq $PROCESS_NAME"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user