mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Prevented error when no servers have been created.
This commit is contained in:
parent
d9da25cc0e
commit
738c2b9e87
18
init/msm
18
init/msm
@ -1504,14 +1504,16 @@ init() {
|
|||||||
|
|
||||||
num_worlds=0
|
num_worlds=0
|
||||||
num_servers=0
|
num_servers=0
|
||||||
|
|
||||||
local id=0
|
if [ -d "$SERVER_STORAGE_PATH" ]; then
|
||||||
while IFS= read -r -d $'\0' path; do
|
local id=0
|
||||||
local name="$(basename "$path")"
|
while IFS= read -r -d $'\0' path; do
|
||||||
server_init "$id" "$name"
|
local name="$(basename "$path")"
|
||||||
id="$(($id+1))"
|
server_init "$id" "$name"
|
||||||
num_servers="$id"
|
id="$(($id+1))"
|
||||||
done < <(find "$SERVER_STORAGE_PATH" -mindepth 1 -maxdepth 1 -type d -print0)
|
num_servers="$id"
|
||||||
|
done < <(find "$SERVER_STORAGE_PATH" -mindepth 1 -maxdepth 1 -type d -print0)
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Called if the script is interrupted before exiting naturally
|
# Called if the script is interrupted before exiting naturally
|
||||||
|
Loading…
Reference in New Issue
Block a user