mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Fixed a loop hang bug in server_worlds_to_disk.
I forgot to increment the loop variable.
This commit is contained in:
parent
062b388ac9
commit
5b8835f62a
8
msm
8
msm
@ -142,14 +142,14 @@ log_line_get_time() {
|
|||||||
# $1: the ID of the world to move
|
# $1: the ID of the world to move
|
||||||
world_to_ram() {
|
world_to_ram() {
|
||||||
if $RAMDISK_STORAGE_PATH; then
|
if $RAMDISK_STORAGE_PATH; then
|
||||||
as_user ${server_user_name[${world_server_id[$1]}]} "mkdir -p ${world_ramdisk_path[$1]} && rsync -rt --exclude '$WORLD_FLAG_INRAM' ${world_path[$1]}/ ${world_ramdisk_path[$1]}"
|
as_user ${server_user_name[${world_server_id[$1]}]} "mkdir -p ${world_ramdisk_path[$1]} && rsync -rt --exclude '$WORLD_FLAG_INRAM' \"${world_path[$1]}/\" \"${world_ramdisk_path[$1]}\""
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Moves a world in RAM to disk
|
# Moves a world in RAM to disk
|
||||||
# $1: the ID of the world to move
|
# $1: the ID of the world to move
|
||||||
world_to_disk() {
|
world_to_disk() {
|
||||||
as_user ${server_user_name[${world_server_id[$1]}]} "rsync -rt --exclude '$WORLD_FLAG_INRAM' ${world_ramdisk_path[$1]}/ ${world_path[$1]}"
|
as_user ${server_user_name[${world_server_id[$1]}]} "rsync -rt --exclude '$WORLD_FLAG_INRAM' \"${world_ramdisk_path[$1]}/\" \"${world_path[$1]}\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -270,8 +270,10 @@ server_worlds_to_disk() {
|
|||||||
# For each of the servers worlds:
|
# For each of the servers worlds:
|
||||||
while [[ $i < $max ]]; do
|
while [[ $i < $max ]]; do
|
||||||
if [ -e ${world_ramdisk_path[$i]} ]; then
|
if [ -e ${world_ramdisk_path[$i]} ]; then
|
||||||
world_to_ram $i
|
world_to_disk $i
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
i=$(( $i + 1 ))
|
||||||
done
|
done
|
||||||
echo "Done."
|
echo "Done."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user