diff --git a/init/msm b/init/msm index 92876e3..7c8c3d7 100755 --- a/init/msm +++ b/init/msm @@ -1499,12 +1499,12 @@ init() { num_worlds=0 num_servers=0 - local server_id=0 - while IFS= read -r -d $'\0' server_path; do - local name=$(basename $server_path) - server_init $server_id $name - server_id=$(($server_id+1)) - num_servers=$server_id + local id=0 + while IFS= read -r -d $'\0' path; do + local name=$(basename $path) + server_init $id $name + id=$(($id+1)) + num_servers=$id done < <(find "$SERVER_STORAGE_PATH" -mindepth 1 -maxdepth 1 -type d -print0) }