mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Added output to help when a world link cannot be created.
This commit is contained in:
parent
14f2804fde
commit
bd5e15e9e1
10
msm
10
msm
@ -248,6 +248,7 @@ server_ensure_links() {
|
|||||||
echo -n "Maintaining world symbolic links... "
|
echo -n "Maintaining world symbolic links... "
|
||||||
local i=${server_world_offset[$1]}
|
local i=${server_world_offset[$1]}
|
||||||
local max=$(( $i + ${server_num_worlds[$1]} ))
|
local max=$(( $i + ${server_num_worlds[$1]} ))
|
||||||
|
local output="false"
|
||||||
|
|
||||||
while [[ $i -lt $max ]]; do
|
while [[ $i -lt $max ]]; do
|
||||||
# -L checks for the path being a link rather than a file
|
# -L checks for the path being a link rather than a file
|
||||||
@ -286,12 +287,19 @@ server_ensure_links() {
|
|||||||
as_user ${server_user_name[$1]} "ln -s \"${world_path[$i]}\" \"${world_link[$i]}\""
|
as_user ${server_user_name[$1]} "ln -s \"${world_path[$i]}\" \"${world_link[$i]}\""
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echoerr -en "\n Error: Could not create link for world \"${world_name[$i]}\". The file \"${world_link[$i]}\" already exists, and should not be overwritten automatically. Either remove this file, or rename \"${world_name[$i]}\"."
|
||||||
|
output="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
i=$(( $i + 1 ))
|
i=$(( $i + 1 ))
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Done."
|
if [[ $output == "true" ]]; then
|
||||||
|
echo -e "\nDone."
|
||||||
|
else
|
||||||
|
echo "Done."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Moves a servers worlds into RAM
|
# Moves a servers worlds into RAM
|
||||||
|
Loading…
Reference in New Issue
Block a user